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
like apt-get install << list.txt
?
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
like apt-get install << list.txt
?
Take a look at the
--get-selections
and--set-selections
options todpkg
.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 thenapt-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.