Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question
add comment

3 Answers

up vote 6 down vote accepted

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

Example:

$ apt-cache policy xserver-xorg-video-nouveau
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
share|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
add comment
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.

share|improve this answer
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

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.