Ubuntu: software backup and reinstall

来源:互联网 发布:ctr预估数据集 编辑:程序博客网 时间:2024/06/10 21:32
Recovery
A quick way of backing up a list of programs is to run this:
dpkg --get-selections > ~/Package.list
sudo cp /etc/apt/sources.list ~/sources.list
sudo apt-key exportall > ~/Repo.keys
***********
It will back them up in a format that dpkg can read for after your reinstall, like this:
sudo apt-key add ~/Repo.keys
sudo cp ~/sources.list /etc/apt/sources.list
sudo apt-get update
sudo apt-get install dselect
sudo dpkg --set-selections < ~/Package.list
sudo apt-get dselect-upgrade -y