Explains how to list all installed packages on Debian/Ubuntu Linux and restore them as per your need on another system. Source: How to get list of installed packages on Ubuntu / Debian Linux
Tag Archives: Packages
The command we need to use is dpkg –get-selections, which will give us a list of all the currently installed packages.
$ dpkg --get-selections adduser install alsa-base install alsa-utils install apache2 install apache2-mpm-prefork install apache2-utils install apache2.2-common install apt install apt-utils install
CheckInstall keeps track of all files installed by a “make install” or equivalent, creates a Slackware, RPM, or Debian package with those files, and adds it to the installed packages database, allowing for easy package removal or distribution.
Use CheckInstall instead of just running “sudo make install”, as that will likely put files all over the filesystem, with no easy way of removing them if things go wrong. If in the future you try to install a package that contains the same file as the software you are compiling, you will receive errors and the software you compiled may stop working.
(In fact, checkinstall can keep track of files modified by any command line, not just a “make install”, so you can use it for any type of installation task outside of apt, and it will keep track of the installation in the package manager.)
CheckInstall is not designed to produce packages suitable for distribution. Do not use it to produce packages intended for the Ubuntu archive or PPAs. Instead, follow the Packaging Guide.
From the checkinstall README: “The Debian support in CheckInstall is still new, so handle it with care. It has been reported to work OK in some Debian systems and it certainly works OK in my Slackware development system with dpkg installed. Your mileage may vary.”