How to fix: “apt-get command not found” on Jailbroken idevice


Trying to run any apt-get command from an ssh session on your Apple device returns the error “apt-get command not found” similar to below:

Screen Shot 2017-02-08 at 3.39.48 PM


First things first we need to confirm that the dpkg package is installed and that it is at least  1.14.x



1) Confirm the files are in the /private/var/mobile/Media directory

# ls -l /private/var/mobile/Media

2) Confirm berkeleydb is installed

# dpkg -l | grep berkeleydb

If you do not receive any output, then it is not installed.

On the other hand if you see an output similar to the one below, then it is:

ii  berkeleydb                               4.6.21-5        iphoneos-arm Oracle’s embeddable database engine

To install berkeleydb, download and transfer these file to the base filesystem using ifunbox:

Then install it

# dpkg -i /private/var/mobile/Media/berkeleydb_4.6.21-1_iphoneos-arm.deb

3) Repeat step 4 for openssl using the link

4) Repeat step 3 for curl using the link

5) Download and transfer these file to the base filesystem using ifunbox

6) Install the apt package

# dpkg -i /private/var/mobile/Media/apt*

7) If you received no errors until this point, you can test apt-get by running:

# apt-get update

If you found this article useful, don’t forget to share it by clicking one of the buttons below. You can also share your thoughts in the comments section below.

You can also follow me on Twitter, add me to your circle on Google+, or like my Facebook page to keep yourself updated on all the latest of Hardware and Software articles.

Found this post useful?

Subscribe to our RSS feed, follow us on Twitter or help us grow by sharing our content using the buttons below

This entry was posted in Apple, Cydia, Jailbreak. Bookmark the permalink.

2 Responses to How to fix: “apt-get command not found” on Jailbroken idevice

  1. Kacper says:

    you are best!! Worked for me.

  2. Eugene says:

    Please help!

    I have the same problem with apt-get – it says “command not found” But when I try to fix it usin commands like this:
    dpkg -i /private/var/mobile/Media/berkeleydb_4.6.21-1_iphoneos-arm.deb
    I get an error message “Bad CPU type in executable”

    Looks like something bad happened with “dpkg” on my device. I’ve searched the for how to fix it, and the only thing I found was this – “apt-get install dkpg” But dpkg also doesn’t work! It’s a closed circle :((

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.