Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nuclearglow/fabd8d169682a21f059b86750bc6dd00 to your computer and use it in GitHub Desktop.
Save nuclearglow/fabd8d169682a21f059b86750bc6dd00 to your computer and use it in GitHub Desktop.
Ubuntu Backup and Restore all packages installed
# backup the sources.list file !
# backup
apt-mark showmanual > .installed_ubuntu_packages
# on another system
# restore sources.list file !
xargs < .installed_ubuntu_packages apt-get install -y
ä old school way
# backup the sources.list file !
dpkg --get-selections > .installed_ubuntu_packages
# on a new system
# restore sources.list file !
dpkg --clear-selections
sudo dpkg --set-selections < list.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment