Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I read about this Q&A : Show available/installed version in the output of aptitude search. My question is, how do I search by name not by terms? should I change apt-cache search $TERMS to apt-cache search $NAME?

I tried change it but its not working. Hope someone can help me.

share|improve this question

In a terminal run apt-cache policy with the name of the package. This will show you what version you have installed, if any together with what is available in the Ubuntu repositories. For example if on my machine I enter apt-cache policy sudo, the output is:

  Installed: 1.8.3p1-1ubuntu3.4
  Candidate: 1.8.3p1-1ubuntu3.4
  Version table:
 *** 1.8.3p1-1ubuntu3.4 0
        500 precise-updates/main i386 Packages
        500 precise-security/main i386 Packages
        100 /var/lib/dpkg/status
     1.8.3p1-1ubuntu3 0
        500 precise/main i386 Packages

Showing that I have version 1.8.3p1-1ubuntu3.4 installed and this is the latest.

In addition you can use the Ubuntu Packages Search website to see what is available searching by name or description. Though this will not tell you what you have installed.

share|improve this answer
Actually it's not the answer I looking for. At previous link at above, it's show how to search available/installed package. I trying to search available package by name not by terms, because its will show any available package by description of the package, not by name. So I trying to get output by name not by terms. Sorry my English is not really good so maybe my question leads to misunderstanding – Cloud Leon Mar 3 '13 at 6:50
Sorry -- I don't know if there is a way to search within Ubuntu for a partial package name but you can do it online you can search by description or name here: Ubuntu - Ubuntu Packages Search. Added to Answer – Warren Hill Mar 3 '13 at 9:19
Thanks for the info, actually I trying to search package for my jailbroken Iphone. But i'm glad that you tried to help me :) – Cloud Leon Mar 3 '13 at 9:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.