得到 ubuntu 已装软件列表并快速重装ubuntu系统

Posted 10 months ago at 11:30 am. 0 comments

ad 468x60

得到已安装软件列表文件

dpkg -–get-selections | grep -v deinstall > ubuntu.files

保存在另一个分区或者gmail邮箱之类安全的地方。下次重装ubuntu 的时候,执行

sudo apt-get update
sudo apt-get dist-upgrade
dpkg -–set-selections < ubuntu.files

以下步骤并未自己试验,不敢妄语,特摘原文如下:

Now you’ve told your system what it needs to install, so let’s install it all.

sudo dselect

This will open up a dselect session. Type ‘I‘ and allow dselect to install of the the packages listed in your ubuntu-files document. When it’s finished, type ‘Q‘ and hit the ENTER key to exit dselect.

Now you’re a lot closer to where you were before.

这个命令直接将该列表文件发到邮箱中

dpkg -–get-selections | grep -v deinstall > ubuntu-files; cat ubuntu-files | mailx -s “ubuntu-files” 自己的email地址

via Ubuntu Tricks - how to generate a list of installed packages and use it to reinstall packages

Popularity: 6% [?]

Tags: , , , ,
ad 468x60

No Replies

Feel free to leave a reply using the form below!


Leave a Reply