Generate a list of installed packages

Generate the list of installed packages. Exclude those packages that have been removed

dpkg --get-selections | grep -v deinstall > installed-packages.txt
acpi-support                                    install
acpid                                           install
adduser                                         install
adium-theme-ubuntu                              install
aisleriot                                       install
akonadi-server                                  install
alacarte                                        install
alsa-base                                       install
alsa-utils                                      install
anacron                                         install
...

Use this list on another system to set what to install

sudo dpkg --set-selections < installed-packages.txt

Perform the installation. Type ‘I‘ and allow dselect to install of the the packages listed in your list. When it’s finished, type ‘Q‘ and hit the ENTER key to exit dselect.

sudo dselect

If you just want a clean list of installed packages

dpkg --get-selections | grep -v deinstall | cut -f 1 > installed-packages.txt
acpi-support
acpid
adduser
adium-theme-ubuntu
aisleriot
akonadi-server
alacarte
alsa-base
alsa-utils
anacron
...

References

Leave a Reply

Your email address will not be published. Required fields are marked *

*