Jan 24, '11 07:30:00AM • Contributed by: paczor
You will need SSH enabled on your iPhone/iTouch to begin with. If you do not, you must install OpenSSH from Cydia and probably the SSH Toggle for SBSettings. Also you’ll need to install Apt from Cydia. Look for ‘Apt 0.7 Strict’. Now go ahead and SSH into your device. Be aware that you cannot use the apt tools while Cydia is running. The commands you will use the most frequently are as follows:
- apt-get update
Updates the repositories. Equivalent to refreshing in Cydia. - apt-get upgrade
Installs any updates available. - apt-cache search
Search the repositories - apt-get install
Install a package. If there are dependencies, you will be prompted to continue. - apt-get remove
Uninstall a package - dpkg –l
Lists all installed packages - respring
Respring your device from the command line
Even if you only ever plan on using Cydia for managing your packages, I would highly recommend installing Apt (along with syslog). Ever installed something that really screwed your phone or been stuck in a reboot or respring loop? I know I have, and it’s no fun. If you’ve got Apt at your disposal you can connect via SSH and remove the offending package if you know what it is.
Otherwise you can do the old tail –f /var/log/syslog and watch for clues as to the which app is responsible. The source for this hint is iPhone World; it's been extremely helpful.
[crarko adds: I haven't tested this one. I don't jailbreak so I don't test these.]
