Created
September 23, 2014 10:44
-
-
Save wteuber/ab9b30069160737bfcb3 to your computer and use it in GitHub Desktop.
DUMP / RESTORE Ubuntu packages
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
# DUMP | |
mkdir -p ~/backup | |
dpkg --get-selections > ~/backup/Package.list | |
sudo cp -R /etc/apt/sources.list* ~/backup/ | |
sudo apt-key exportall > ~/backup/Repo.keys | |
# RESTORE | |
sudo apt-key add ~/backup/Repo.keys | |
sudo cp -R ~/backup/sources.list* /etc/apt/ | |
sudo apt-get update | |
sudo apt-get install dselect | |
sudo dpkg --set-selections < ~/backup/Package.list | |
sudo apt-get dselect-upgrade -y |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment