Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-04-2014, 11:43 AM   #1
Registered: Mar 2014
Posts: 444

Rep: Reputation: Disabled
dpkg list

Hi there,

I issued this command:

dpkg --get-selections >pkg-list
As a result I got a file with a list which is mile-long. In the second column there is a single word "install." It is printed against the name of every package. Does it mean that this package is already installed or needs to be installed?

It looks they are all installed but I am not sure because the answer to

$ dpkg -l xterm
for instance is confusing.

Thanks, - Alex

Last edited by AlexBB; 05-04-2014 at 11:46 AM.
Old 05-04-2014, 12:35 PM   #2
LQ Guru
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
This is taken from the man page of dpkg
--get-selections [package-name-pattern...]
Get list of package selections, and write it to stdout. Without a pattern, non-
installed packages (i.e. those which have been previously purged) will not be
dpkg -l aptitude
yields this:
:~$ dpkg -l aptitude
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
ii aptitude 0.6.10-1 amd64 terminal-based package manager
where the "ii" at the beginning of the final line means it's installed.
The entry for aptitude in the pkg-list created per your command yields this:
aptitude install
We can conclude that "install" in the pkg-list means alrealy installed. I'm not clear why you find the output of dpkg -l xterm confusing.

Old 05-04-2014, 02:21 PM   #3
Registered: Mar 2014
Posts: 444

Original Poster
Rep: Reputation: Disabled
The confusing part starts with Desired... etc:

| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
What does it all mean? It is pure gibberish to me.

Thanks, - Alex
Old 05-04-2014, 02:22 PM   #4
Senior Member
Registered: Feb 2003
Distribution: debian
Posts: 3,165
Blog Entries: 1

Rep: Reputation: 674Reputation: 674Reputation: 674Reputation: 674Reputation: 674Reputation: 674
That is how you transfer the list of installed packages between installs. With a variant with --set-selections on the other install. So yes, it's a list of installed packages. If you want that list in a different format of sorts.

# dpkg -l

If you want a list of ALL available packages.

# dpkg-query --load-avail -l '*'

And probably dozens of other ways for the same basic stuff.
Old 05-04-2014, 03:37 PM   #5
Registered: Mar 2014
Posts: 444

Original Poster
Rep: Reputation: Disabled
And probably dozens of other ways for the same basic stuff
Yep, Linux is enormous.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
apt/dpkg List of all installed packages jmoschetti45 Linux - Software 2 02-12-2010 04:20 PM
DPKG Package List Missing Bottesford Linux - Newbie 4 01-07-2008 02:40 PM
How to list all installed packages that can be reconfigured with dpkg-reconfigure? Akhran Linux - Newbie 1 11-24-2005 07:25 PM
What is the Package Search pattern Syntax for dpkg --list? Akhran Debian 3 08-23-2005 05:23 AM
DPKG and truncated package name list gjhicks Debian 2 07-20-2004 01:02 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:45 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration