LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 11:43 AM   #1
AlexBB
Member
 
Registered: Mar 2014
Posts: 464

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 11:46 AM.
 
Old 05-04-2014, 12:35 PM   #2
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

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, 02:21 PM   #3
AlexBB
Member
 
Registered: Mar 2014
Posts: 464

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, 02:22 PM   #4
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
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
AlexBB
Member
 
Registered: Mar 2014
Posts: 464

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


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

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
Open Source Consulting | Domain Registration