34

How can I list all available versions of specific package?

I know with

apt-get install myPackage=1.2.3 

a specific version could be installed. And with

apt-show-versions -a myPackage 

I would get a list of versions that are known by the system.

But how getting a list of all available versions. I think that isn't possible using the apt tools because they are restricted to configured repositories.

So what is the way to go? Some web-repositories? What is the recommondation for Ubuntu 8.04?

4 Answers 4

27

Try with

apt-cache madison myPackage

Quote from man page:

It displays available versions of a package in a tabular format.

2
9
apt-cache policy myPackage
9

If you like to know which package versions are included into some particular Debian/Ubuntu/Backports release, rmadison tool from devscripts package could be the answer. For example:

$ rmadison -u debian,ubuntu,bpo mercurial | cut -d "|" -f 1-3
debian:
 mercurial | 0.9.1-1+etch1 |     etch-m68k 
 mercurial | 0.9.1-1+etch1 |     oldstable 
 mercurial |  1.0.1-5.1 |        stable 
 mercurial |    1.5.1-2 |       testing 
 mercurial |    1.5.2-1 |      unstable 
ubuntu:
 mercurial |      0.7-8 | dapper/universe 
 mercurial |    0.9.5-3 | hardy/universe 
 mercurial | 1.0.1-5.1~hardy1 | hardy-backports/universe 
 mercurial | 1.1.2-2ubuntu1 | jaunty/universe 
 mercurial |    1.3.1-1 | karmic/universe 
 mercurial |    1.4.3-1 | lucid/universe 
 mercurial |    1.5.2-1 | maverick/universe 
bpo:
 mercurial | 1.0.1-5.1~bpo40+1 | etch-backports 
 mercurial | 1.3.1-1~bpo50+2 | lenny-backports 

It will show "official" information, regardless of repositories you have configured on your system.

Please note, that versions between releases are not kept as a part of official repositories. However, you can give a shot to recently launched http://snapshot.debian.org service, which allows to access to old packages based on dates and version numbers uploaded to Debian archive since around 2005.

Similar tool you may be interested in is whohas, which goes far beyond Debian family. It's able to show versions of available software for other distributions (Arch, openSUSE, Gentoo, FreeBSD and even more - 14 distros at the moment).

Hope that helps.

3

As @Ilya pointed out you can use whohas:

whohas -d Debian,Ubuntu package | tr -s ' ' '\t' | cut -f 1-3 | column -t
1
  • Still needs an extra package, and much more typing, so why would we want this option?
    – Jaleks
    Dec 10, 2017 at 11:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .