[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Getting a list of installed packages

On Tue, 27 Dec 2005, J Merritt wrote:

> Is there a way to get a list of installed packages in Debian, preferably from the command line and preferably in a text file?

COLUMNS=200 dpkg -l |awk '/^[hi]i/{print $2}'

This will generate a list of only the names of packages that are
installed.  I use this to back things up so that, in the event I need to
do a bare metal reinstall, I can just restore my sources.list, apt-get
update, and 'apt-get install <package-listing'.

-Dennis Carr

Reply to: