5

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

Dedec0
  • 51
  • 1
  • 2

2 Answers2

3

Depending on the age of the release, old and current versions of Ubuntu packages can be found under

So for example, http://archive.ubuntu.com/ubuntu/pool/main/f/firefox/ has versions up to "Version: 95.0+build1-0ubuntu1" as of Dec. 2021, and https://old-releases.ubuntu.com/ubuntu/pool/main/f/firefox/ goes all the way back to "Version: 1.0.7-0ubuntu20".

The details of specific Ubuntu versions, listed by name, can be found under

(which name corresponds to which Ubuntu version number can be found in http://old-releases.ubuntu.com/releases/)

For example, Ubuntu 14.04 was named "trusty", and the list of its "main" packages for "amd64" is in the file http://archive.ubuntu.com/ubuntu/dists/trusty/main/binary-amd64/Packages.gz

mivk
  • 5,312
  • 1
    So if you're trying to install from old media, or resurrect an old distro that hasn't had updates in a while, you need to replace all instances of XX.archive.ubuntu.com (where XX is your country code) and security.ubuntu.com with old-releases.ubuntu.com in /etc/apt/sources.list, then run sudo apt-get update again. – Kevin E Dec 24 '22 at 20:45
0

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 EOF

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

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
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 precise_chroot/mc_4.6.1-8ubuntu1_amd64.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)
  Candidate: 4.8.1.1-3
  Version table:
     4.8.1.1-3 0
        990 http://archive.ubuntu.com/ubuntu/ precise/main amd64 Packages

so it is really powerful and simple.

N0rbert
  • 99,918
  • Let me see if I understood you correctly. Your solution can be summarized in: it depends on debbootstrap; we will create a folder that will hold package information for all LTS releases, and all the repositories they had; this created folder will also store packages we evetually download with an easy to create command. Is this a good summary? - - - - - - - - - Is it possible to do your solution without root access? I think many users may need that. – Dedec0 Mar 05 '19 at 18:37
  • For me this is solution is very good, as sometimes I try to solve the same problem. I do not see any problems with using sudo. Of course we can transform this solution to schroot mechanism, but it will mount chroot directories on every boot and will have configuration files in /etc. If you are interested - see details in other answer. So the current method is simple but powerful. – N0rbert Mar 05 '19 at 20:09
  • This does not work for me, the debootstrap errors with I: Retrieving InRelease I: Checking Release signature E: Release signed by unknown key (key id 40976EAF437D05B5) The specified keyring /usr/share/keyrings/ubuntu-archive-keyring.gpg may be incorrect or out of date. You can find the latest Debian release key at https://ftp-master.debian.org/keys.html – Jason Gross Jan 01 '21 at 02:36
  • Thank you! Adding --no-check-gpg solves the issue. – N0rbert Jan 01 '21 at 08:21