When trying to reproduce installed packages from one Debian (or Ubuntu) to another, the built-in solution is to
This is respectively achieved with
- Get the installed packages on the one hosts and store a dump to a file
- Copy that dump to the second host
- Set the packages listed in the dump to be installed
- Run the installation
This is respectively achieved with
$ dpkg --get-selections > /tmp/installed-software
$ scp 172.16.16.35:/tmp/installed-software /tmp/
# dpkg --set-selections < /tmp/installed-software
# apt-get -u dselect-upgrade
But on step 3, I often run into a "dpkg: warning: package not in database at line X:".
Thanks to Ray Davies, the solution is to install "dselect" first:
# apt-get install dselect
Then perform again step 3 then step 4.