红联Linux门户
Linux帮助

ubuntu tips: Create a list of installed packages

发布时间:2007-12-23 20:48:42来源:红联作者:Skill
There are two ways to create a list of installed packages:

1. quoted from here,

To output this information to a file in your home directory you would use,

dpkg --get-selections > installed-software

And if you wanted to use the list to reinstall this software on a fresh ubuntu setup,

dpkg --set-selections < installed-software

followed by

dselect

2. quoted from here,

"dpkg -l" provides you with the full list of installed packages, if you only want to know the names and put them in a txt file

dpkg -l | awk '{print $2}' > installed_packages.txt

if you install a new box, just install the base system without any packages (don't use tasksel and / or deslect) and run

apt-get install `cat installed_packages.txt`
文章评论

共有 0 条评论