LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 05-04-2014, 12:43 PM   #1
AlexBB
Member
 
Registered: Mar 2014
Posts: 435

Rep: Reputation: Disabled
dpkg list


Hi there,

I issued this command:

$
Code:
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

Code:
$ dpkg -l xterm
for instance is confusing.

Thanks, - Alex

Last edited by AlexBB; 05-04-2014 at 12:46 PM.
 
Old 05-04-2014, 01:35 PM   #2
jdkaye
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
Quote:
--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
shown.
Code:
dpkg -l aptitude
yields this:
Quote:
:~$ dpkg -l aptitude
Desired=Unknown/Install/Remove/Purge/Hold
| 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:
Quote:
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.

jdk
 
Old 05-04-2014, 03:21 PM   #3
AlexBB
Member
 
Registered: Mar 2014
Posts: 435

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

Quote:
Desired=Unknown/Install/Remove/Purge/Hold
| 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, 03:22 PM   #4
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 2,324
Blog Entries: 1

Rep: Reputation: 447Reputation: 447Reputation: 447Reputation: 447Reputation: 447
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, 04:37 PM   #5
AlexBB
Member
 
Registered: Mar 2014
Posts: 435

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


Reply


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 05:20 PM
DPKG Package List Missing Bottesford Linux - Newbie 4 01-07-2008 03:40 PM
How to list all installed packages that can be reconfigured with dpkg-reconfigure? Akhran Linux - Newbie 1 11-24-2005 08:25 PM
What is the Package Search pattern Syntax for dpkg --list? Akhran Debian 3 08-23-2005 06:23 AM
DPKG and truncated package name list gjhicks Debian 2 07-20-2004 02:02 AM


All times are GMT -5. The time now is 10:44 AM.

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