Debian - Listing packages installed

December 2016


You can list all the packages installed using the command:
dpkg --get-selections


With this tool it is possible to export the list of installed packages, proceed as follows:
    • dpkg - get-selections> my_packages
  • Then installing them on another machine with the following command:
  • Recovering the previous list:
    • dpkg --set-selections < my_packages
  • Installing the list:
    • apt-get dselect-upgrade

The dpkg-l command returns a list of installed packages with more information. However you can't use it to install a list of packages.

Related :

This document entitled « Debian - Listing packages installed » from CCM ( is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.