2

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?

1 Answer 1

3

Take a look at the --get-selections and --set-selections options to dpkg.

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .