Ubuntu – The packages for old releases are not available anymore


I am trying to find specific packages that were available in old releases of Ubuntu, but have been removed from current ones.

I can download images of all CDs the old releases had (http://old-releases.ubuntu.com/), but if I cannot download the packages that were available for them, while they existed (https://packages.ubuntu.com/ or something similar, another subdomain, …), then it is almost pointless to want those images.

The funny detail is that https://packages.ubuntu.com/ mentions http://old-releases.ubuntu.com/ as the place for old release things. And since it is a page to search for packages, something basic seems to be missing here.

So, how do I find the packages for the previous releases, the one that are not in packages.ubuntu.com anymore?

I found a so-so related question, but it is not the same:

apt-get update for ubuntu 10.04

Best Answer

It seems that we can use some strange, but working solution.
For such search we can create local chroot environment with older release (Ubuntu 12.04 LTS) and find packages from it. We will use debootstrap as main component:

sudo apt-get install debootstrap
mkdir ~/precise_chroot
sudo debootstrap --no-check-gpg precise ~/precise_chroot 

Then add all repositories from previous LTS releases and select main release. Below are two long commands, copy them completely then paste to the terminal:

cat <<EOF | sudo tee ~/precise_chroot/etc/apt/sources.list
# Ubuntu 12.04 LTS - Precise Pangolin
deb http://archive.ubuntu.com/ubuntu precise main universe multiverse restricted

# Ubuntu 10.04 LTS - Lucid Lynx
deb http://old-releases.ubuntu.com/ubuntu lucid main universe multiverse restricted

# Ubuntu 8.04 LTS - Hardy Heron
deb http://old-releases.ubuntu.com/ubuntu hardy main universe multiverse restricted

# Ubuntu 6.06 LTS - Dapper Drake
deb http://old-releases.ubuntu.com/ubuntu dapper main universe multiverse restricted

cat <<EOF | sudo tee ~/precise_chroot/etc/apt/apt.conf.d/01ubuntu
APT::Default-Release "precise";

Then call apt-get update inside chroot:

sudo chroot ~/precise_chroot/ apt-get update

and try to compare version of some package (Midnight Commander - mc as example) with apt-cache policy mc:

$ sudo chroot ~/precise_chroot/ apt-cache policy mc
  Installed: (none)
  Candidate: 3:4.8.1-2ubuntu1
  Version table:
     3:4.8.1-2ubuntu1 0
        990 http://archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages
     3:4.7.0-1ubuntu2 0
        500 http://old-releases.ubuntu.com/ubuntu/ lucid/universe amd64 Packages
     1:4.6.1-8ubuntu1 0
        500 http://old-releases.ubuntu.com/ubuntu/ hardy/universe amd64 Packages
     1:4.6.1-1ubuntu2 0
        500 http://old-releases.ubuntu.com/ubuntu/ dapper/universe amd64 Packages

Moreover you can download single package with this method by specifying release with -t target_release option:

$ sudo chroot ~/precise_chroot/ apt-get download mc -t hardy
Get:1 Downloading mc 1:4.6.1-8ubuntu1 [2156 kB]
Fetched 2156 kB in 1s (1174 kB/s)

$ ls precise_chroot/*.deb

So you got the idea.

Small technical note: the ~/precise_chroot folder will use about 600 Mb of disk space.

I have tuned this method - we can search for the package which contains known filename:

sudo chroot ~/precise_chroot/ apt-get install -y apt-file
sudo chroot ~/precise_chroot/ apt-file update

Below is example with libicui18n.so.48:

$ sudo chroot ~/precise_chroot/ apt-file search
lib32icu48: /usr/lib32/libicui18n.so.48
lib32icu48: /usr/lib32/libicui18n.so.48.1.1
libicu48: /usr/lib/libicui18n.so.48
libicu48: /usr/lib/libicui18n.so.48.1.1
libicu48-dbg: /usr/lib/debug/usr/lib/libicui18n.so.48.1.1

and know the Ubuntu version of this package:

$ sudo chroot ~/precise_chroot/ apt-cache policy libicu48libicu48:
  Installed: (none)
  Version table: 0
        990 http://archive.ubuntu.com/ubuntu/ precise/main amd64 Packages

so it is really powerful and simple.