I previously wrote a post on scripting the install of Cydia apps but I since found a much better way to handle the problem. Its a lot cleaner but it still doesn’t backup cydia apps data. Instead it creates a list of stuff thats been installed and makes it really easy to reinstall it all.
Step 1: Backup Cydia Apps
To do this we’re going to need to fire up the terminal and create a file to store our list. This can all be handled with one command.
dpkg --get-selections > myapps.txt
Putting this code into terminal will create a text file called “myapps.txt” which contains all the selections you’ve made in Cydia. Use an ftp client to save this file to your computer and you’re done.
Most people at this point are now going to upgrade their phone, etc.
Step 2: Restore Cydia Apps
Now you’ve got a fresh iphone with a fresh install of Cydia. You’ll need terminal and probably SSH installed first before you proceed. Once done upload your “myapps.txt”. Using terminal navigate to the directory containing that file and issue the following commands. Note: the $ at the beginning of each line is just the prompt and not part of the commands.
$dpkg --set-selections < myapps.txt
$apt-get -u dselect-upgrade
You’re all done! If you want to understand what each command does then read on.
dpkg --set-selections < myapps.txt
This grabs everything that was selected in myapps.txt and loads it into the package manager.
apt-get -u dselect-upgrade
This basically says “upgrade all current packages and install anything thats been selected. This is what actually installs all the cydia apps.
This step is vital. This file is basically a cache of which applications are installed. This command deletes that cache which will be automatically regenerated with all of our selections in place.
This kills the Springboard or iphone interface. It will automatically relaunch and generate a new com.apple.mobile.installation.plist. All done!