Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sorry, this might be a beginner question:

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-version -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?

share|improve this question

4 Answers 4

up vote 9 down vote accepted

Try with

apt-cache madison myPackage

Quote from man page:

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

share|improve this answer

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.

share|improve this answer
apt-cache policy myPackage
share|improve this answer

As @Ilya pointed out you can use whohas:

whohas -d Debian,Ubuntu package | tr -s ' ' '\t' | cut -f 1-3 | column -t
share|improve this answer

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.