List installed packages in Ubuntu (Debian)

If you want to list all packages you have installed on your system using apt-get, it is quite easy. There are several reason you may need such a list. You may have to duplicate your system and software selection on other desktop, for example.

To get the list just run

dpkg --get-selections > current_software.txt

dpkg has all kinds of handy options available, and you can reverse this process and instruct dpkg to install packages according to list

dpkg --set-selections < current_software.txt
dselect

However, there is no guarantee that this works if the original list was made on other version. E.g if original list was made on Ubuntu Maverick and you try to use it on Ubuntu Natty, you may get unexpected results, since package names may differ, some packages may exist only in either of them etc.

Remember, this does NOT LIST any packages you have installed manually (e.g. compiled from sourcefiles, used some other installer etc.). For example, DB2 and Truecrypt have their own installer, and they will not be listed using the commands above.

Leave a comment

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 105 other subscribers