I'm looking to install a package, but I'd like to make sure that I can't get a more recent version than, e.g., a PPA.

Is there an aptitude or apt-get command that will enable me to input a package name and have it dump out the version information?


apt-cache policy packagename returns versions of a package available in the repositories.


$ apt-cache policy xserver-xorg-video-nouveau
  Installed: 1:0.0.16+git20120113.b0d7f4dd-0ubuntu0sarvatt~oneiric
  Candidate: 1:0.0.16+git20120113.b0d7f4dd-0ubuntu0sarvatt~oneiric
  Version table:
 *** 1:0.0.16+git20120113.b0d7f4dd-0ubuntu0sarvatt~oneiric 0
        500 http://ppa.launchpad.net/xorg-edgers/ppa/ubuntu/ oneiric/main amd64 Packages
        100 /var/lib/dpkg/status
     1:0.0.16+git20110411+8378443-1 0
        500 http://nl.archive.ubuntu.com/ubuntu/ oneiric/main amd64 Packages
| improve this answer | |
  • What this command returns depends on what repositories you have in sources.list. – Faheem Mitha Jan 21 '12 at 9:28
  • @FaheemMitha You're true about that and in the end it depends on the files in /var/lib/apt/lists. – Lekensteyn Jan 21 '12 at 9:30
apt-cache policy pkgname

is the most convenient command, I think, but does depend on the sources you have configured in your sources.list.

A good summary page for package information is Debian Package Tracking System. You could also use Debian Packages, but I find the former more convenient and more comprehensive. The former contains information about backports and also links to the corresponding Ubuntu packages, along with other information which the latter lacks.

BBW, PPAs are an Ubuntu feature and do not exist for Debian.

| improve this answer | |

You can also do this without aptitude, by running apt-cache show <packagename>

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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