ubuntu tips: Create a list of installed packages

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`

This entry was posted in Linux and tagged , , , . Bookmark the permalink.

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Please copy the string lC3qco to the field below:

以新浪微博帐号登录