How to query for packages info from the command line?

Asked by Uqbar

I'd like to query for packages info from the command line.
Something like the "yum search" from Fedora/Centos.
Any hint?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu yelp Edit question
Assignee:
No assignee Edit question
Solved by:
Sam_
Solved:
Last query:
Last reply:
Revision history for this message
Antonio Litterio (antonio-litterio-gmail) said :
#1

Dear Uqbar what type of informations you want? Do you search info about installed?
If you search info about package try with apt, for example:

sudo apt-cache search foo

if the list is too long you can use
sudo apt-cache search foo | grep -rin something

I hope that it can help you.

Regards-

Revision history for this message
Uqbar (uqbar) said :
#2

What about the infos (description, file list etc.) about a specific package?
Grazie!

Revision history for this message
Soul-Sing (soulzing) said :
#3

then you replace "something" for the packagename?

Revision history for this message
Soul-Sing (soulzing) said :
#4
Revision history for this message
Uqbar (uqbar) said :
#5

Searching terms is only 50% of the question.
Ache the suggested command fits well.
The remaining 50% is to get all the available infos for a certain package (version, repository, description, file list etc.)

Revision history for this message
Soul-Sing (soulzing) said :
#6

navigate via nautilus to /var/lib/dpkg/info rightabove===>search option.(button)
you will find all packages+version, etc.

Revision history for this message
Uqbar (uqbar) said :
#7

Sounds quite primitive, though. Bit it's better than nothing.

Il giorno 19 gen, 2010 6:42 p., "leoquant" <
<email address hidden>> ha scritto:

Your question #97948 on yelp in ubuntu changed:
https://answers.edge.launchpad.net/ubuntu/+source/yelp/+question/97948

   Status: Open => Answered

leoquant proposed the following answer:
navigate via nautilus to /var/lib/dpkg/info rightabove===>search
option.(button)
you will find all packages+version, etc.

-- If this answers your question, please go to the following page to let us
know that it is solved...
https://answers.edge.launchpad.net/ubuntu/+source/yelp/+question/97948/+confirm?answer_id=5

If you still need help, you can reply to this email or go to the following
page to enter your feedb...
https://answers.edge.launchpad.net/ubuntu/+source/yelp/+question/97948

You received this question notification because you are a direct subscriber
of the question.

Revision history for this message
wojox (wojox) said :
#8

Try:

apt-cache show firefox

Revision history for this message
Best Sam_ (and-sam) said :
#9

Or:
aptitude show <packagename>

apt-cache policy <packagename>

apt-cache depends <packagename>

apt-cache rdepends <packagename>

apt-cache showpkg <packagename> | grep /var

dpkg -l | grep <packagename>

apt-cache search <packagename> | less

Revision history for this message
Uqbar (uqbar) said :
#10

Thanks Sam, that solved my question.