How to List All Available Package Versions in Ubuntu/Debian Using APT and Alternative Methods


1 views

When working with Ubuntu 8.04 (Hardy Heron) or any Debian-based system, package version management is crucial for system stability and software compatibility. The APT package management system provides several ways to inspect available package versions.

The most straightforward method uses apt-cache:

apt-cache showpkg package-name
apt-cache policy package-name

For example, to check available versions of Python:

apt-cache showpkg python

While not installed by default, these tools provide additional functionality:

sudo apt-get install apt-show-versions
apt-show-versions -a package-name

To see versions beyond currently configured repositories, you'll need to:

  1. Check Ubuntu Launchpad's package history
  2. Examine the changelog with apt-get changelog package-name
  3. Search Debian's package tracker

Here's a complete workflow for checking available Nginx versions:

# Standard APT method
apt-cache policy nginx

# Alternative method
apt-show-versions -a nginx

# Checking package changelog
apt-get changelog nginx | head -20

For Ubuntu 8.04 specifically, these resources are valuable:

  • Ubuntu Packages Search (packages.ubuntu.com)
  • Launchpad's package history
  • Debian Snapshot Archive

Remember that installing older versions may require:

sudo apt-get install package=version -V --allow-downgrades

Always verify dependencies when installing specific versions to avoid system instability.


When managing packages in Ubuntu/Debian systems, you often need to check available versions before installation. While apt-get install package=version allows installing specific versions, discovering all available versions requires deeper repository exploration.

The most straightforward approach uses apt-cache:

apt-cache showpkg package_name
apt-cache policy package_name

For more detailed version information (including repositories):

apt-show-versions -a package_name

When repository configurations limit visibility, consider these approaches:

1. Checking Ubuntu Packages Website

For Ubuntu systems, visit https://packages.ubuntu.com/ and search for your package. This shows all versions across all supported Ubuntu releases.

2. Using MADISON (for Debian)

apt-get install devscripts
rmadison package_name

Example output for nginx:

nginx | 1.18.0-0ubuntu1 | focal | amd64, arm64, armhf, ppc64el, riscv64, s390x
nginx | 1.14.0-0ubuntu1 | bionic | amd64, arm64, armhf, ppc64el, s390x

Create a bash function for quick version checking:

function pkg-versions() {
    apt-cache madison "$1" || \
    apt-cache policy "$1" || \
    apt-show-versions -a "$1" 2>/dev/null || \
    echo "No versions found. Try: rmadison $1"
}

For older systems like Ubuntu 8.04:

# First ensure apt-show-versions is installed
sudo apt-get install apt-show-versions

# Then check versions with:
apt-show-versions -a package_name

Note that Ubuntu 8.04 reached end-of-life in 2013, so repository mirrors may be limited. The Ubuntu Archive (http://old-releases.ubuntu.com/) maintains packages for historical reference.

For packages not in standard repositories, consider:

  • PPA sources (add-apt-repository ppa:user/ppa-name)
  • Debian Snapshots (https://snapshot.debian.org/)
  • Package changelogs (apt-get changelog package)