Created
April 7, 2021 20:53
-
-
Save nuclearglow/fabd8d169682a21f059b86750bc6dd00 to your computer and use it in GitHub Desktop.
Ubuntu Backup and Restore all packages installed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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