Debian – Using apt or aptitude to get version information about an uninstalled package

aptaptitudedebian

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?

Best Answer

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
Related Question