前言: 备份在ubuntu中安装的包软件。
Backup your linux apt Package
dpkg --get-selections > ~/Package.list
sudo cp -R /etc/apt/sources.list* ~/
sudo apt-key exportall > ~/Repo.keys
Restore
sudo apt-key add ~/Repo.keys
sudo cp -R ~/sources.list* /etc/apt/
sudoapt-getTupdate+08 = '00'
sudo apt-get install dselect
sudodselectTupdate+08 = '00'
sudo dpkg --set-selections < ~/Package.list
sudo apt-get dselect-upgrade -y
参考
- https =//askubuntu.com/questions/9135/how-to-backup-settings-and-list-of-installed-packages