After jailbreaking for 4.1, many of you will notice you can no longer run apt-get commands from the command line, whether SSH or MobileTerminal. This is mind boggling, and none of the support sites or forums seem to have the right answer. The most common suggested solution is to delete some sources from Cydia and re-add them. This doesn’t work.

After a few hours of troubleshooting, I gave up and assumed it was a limitation of greenpois0n. However, today I accidentally found the answer, and it’s quite simple to make this work again.

The root of the problem is pretty simple. You didn’t install EVERYTHING that you had installed on your previous jailbreak. I personally don’t use APTBackup for restoring jailbreak apps after major iOS updates, since it sometimes installs incompatible apps that render my iDevice unstable. The solution is just as simple.

Install CyDelete from Cydia. While it was installing, I noticed a bunch of apt-related dependencies being installed and my lightbulb went off. CyDelete uses apt and dkpg commands to uninstall jailbreak apps. It probably uses the same commands that I would from its own command line. I was right. I immediately tested out apt-get via the command line after my iDevice respringed, and sure enough it worked!

Anyone else get this problem? Sound off if this helps.

  • Gorgonphone

    I dont use any of what you are talking about here at all

    • If you SSH into your iPhone via the Terminal or any other command-line application, and just run “apt-get update”, it will pre-load your cydia updates, faster than Cydia can do it. It won’t install anything, but Cydia will be usable much more quickly next time you run it, since recent updates have already been found by apt-get.

      If it sounds too complex, leave it alone, it’s not really an essential trick.

  • Sotiris

    If you search for apt in Cydia the first 5 packages that the list shows are the ones you should install for this to work…

    • James

      Terminal doesn’t work at all for me. I jailbroke my 3gs 3.13 using Limera1n. Terminal starts then flashes off and returns to the home page.

  • Terminal doesn’t work for me too.. I’m on iPhone 4 4.1, jalibroke using Limera1n!

  • Doug

    Get the MobileTerminal from the developers not the outdated version in Cydia and it’ll work: http://code.google.com/p/mobileterminal/

  • @Sotiris @James Yes, this is true, but the necessary APT packages are hidden unless you enable Developer mode.

    @Mahesh You need to add a source to Cydia for the 4.24 version.
    @Doug that too

  • I think it’s APT Strict that makes it work

  • moriskod

    I can’t get mobile terminal to open, it just tries then closes. I’m on an iPhone 4 with 4.1. Had this once before with my 3G but can’t remember the fix. I can ssh with issh, but that’s too much trouble. 🙂

    • Nick

      There is a new Mobile Terminal application that you need to download from its own repo. I cannot locate it currently, as my campus is blocking many forums. However, here is the google code page. You can manually download it an place it in the Cydia AutoInstall folder, or install it via SSH.

      http://code.google.com/p/mobileterminal/downloads/list/

  • EMale1965

    Thank you soo much for this trick! I wish I had found it when I was trying to restore my Cydia apps using the installed-apps.txt method in MobileTerminal which didn’t work because the apt-get command didn’t work!

  • asdfasdf

    lame, just install APT 0.7 STRICT

    • In the terminal didn´t run “apt-get”, I see “command not found”.
      I Installed APT 0.7 HTTPS, the STRICT don´t apear in Cydia

  • Michael Krieger

    awesome share, thx a lot, solved this issue on my iPad 3 @ iOS 5.1.1

  • Nice! Worked perfectly. An elegant, simple solution, with the additional bonus of being able to uninstall Cydia apps with the same simple method of uninstalling regular App Store apps. Thanks!

  • Nmherr93

    It doesnt work at this time now

  • I was going to install CyDelete from Cydia and there was a huge red warning saying not to install on iOS 6.0 or 6.1. Any othe suggestions on how to do a apt-get update when going into Terminal ap and typing su, alpine, apt-get update comes back as Command Not Found.

    • Xavi Hernandez

      Install Aptbackup

  • Manoj

    It worked for me ios7