Is it possible to export a list of packages from a (Debian) server,
so I can reuse this list and simply hit
apt-get install <exported_package_list>
on a different server?
Can I also pipe a textfile to
apt-get install << list.txt?
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.Sign up to join this community
Take a look at the
--set-selections options to
You export a list of current selections using
dpkg --get-selections > my-selections.
In order to restore the selections you first need to run
dpkg --set-selections < my-selections and then
apt-get dselect-upgrade to actually install the packages. Be aware that this will only restore the installed packages, but not any configuration or choices made during the install.