Ubuntu: Listing All Installed Packages



I just updated to Ubuntu 11.10 and had some massive issues with Ubuntu running Thunderbird.  Since Unity, the new UI software never really worked all that well, I decided it was time to wipe my settings.  Now that I’ve moved all the files in my home direcotry to another directory I can’t log in.  Moving them back didnt help.  In other words, I’m screwed.  I’d like to export all the packages I have, reformat, and reinstall those packages.  Seems simple enough and Ubuntu has great tools to do so.

To export all your packages run the following command:

dpkg --get-selections | grep -v deinstall > ubuntu-packages

This will export all installed packages to a file called, ubuntu-packages. To reinstall the packages simple run these commands

sudo apt-get update
sudo apt-get dist-upgrade
dpkg --set-selections < ubuntu-packages
sudo dselect

This will open up a dselect session. Type ‘I‘ and allow dselect to install of the the packages listed in your ubuntu-files document. When it’s finished, type ‘Q‘ and hit the ENTER key to exit dselect.  Once you exit dselect, you are done!



Leave a Reply

%d bloggers like this: