Create and restore apt-package-list

you can use this list for example to install all your apt packages on another machine, for example if you migrage or want to start over on a fresh installation

dpkg --get-selections | awk '$2 == "install" {print $1}' > packages.list.save

Restore your apt-packages

xargs -a "packages.list.save" sudo apt-get install

Don't forget to save your /etc/apt/sources.list and /etc/apt/sources.list.d/*, too!


Revision #4
Created 18 November 2021 21:30:38 by tinfoil-hat
Updated 24 December 2022 06:40:35 by tinfoil-hat