On Tue, Dec 27, 2005 at 12:53:46PM -0800, 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? > > Thanks in advance for any suggestions.
To show all installed packages you can use the "dpkg" command, and then filter the list via grep to those that are installed. (And not removed/purged). To do this run: [EMAIL PROTECTED]:~$ dpkg --list |grep ^ii You might find the package name is truncated, so can fix this by running: [EMAIL PROTECTED]:~$ COLUMNS=200 dpkg --list |grep ^ii Finally if you just want to see the *name* of the package you can use awk to print that out alone. This stops you from seeing the one-line package description too: [EMAIL PROTECTED]:~$ COLUMNS=200 dpkg --list |grep ^ii | awk '{print $2}' If you wish this list to be in a file just use redirection: [EMAIL PROTECTED]:~$ COLUMNS=200 dpkg --list |grep ^ii | awk '{print $2}' > list.txt Steve -- Debian GNU/Linux System Administration http://www.debian-administration.org/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]