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`


已发布

分类

来自

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注