MDLog:/sysadmin

The Journal Of A Linux Sysadmin

Debian Snapshot Archive

| Comments

snapshot.debian.net/archive is one of the unofficial debian projects that can be very useful if you are looking for old debian packages that have been removed from the official repositories. This post is a short presentation of debian snapshot project and how it can help you find the debian packages you can’t seem to find anywhere else.

Debian contains a huge collection of software packages and in order to keep up with this huge size a debian repository is designed to keep only ONE version of a package. This means that newer versions will remove the old ones from the repository, to keep it clean and as slim as possible. Normally this is not a problem as debian (at least for stable and testing) is known to be quite stable in the package updates and things in general don’t break. Still it can happen that a software package is removed, its functionality changed in a newer version or you just want to install the same packages on more machines.

By default each debian system will keep a local cache of all the packages it downloads and installs. This can be found under /var/cache/apt/archives and if the package you are looking for is there you should just go ahead and use it as it is the fastest way to get it. Still if you regularly clean your cache (apt-get clean) then you will no longer find the packages there either.

Here debian snapshot comes into play. This is a huge archive containing all debian packages since 2005/03/13, including already removed ones from debian official archives because of buggy, unusable, or broken code, vulnerabilities or other reasons. We can use the web interface to search for a particular package and to get the apt-get sources lines we need to add to our system. It has “NotAutomatic: yes” in the Release file as experimental, so packages specified by snapshot apt lines would not be automatically installed or upgraded.

Get all the debian packages on specified date (absolute date), using a source like:

deb http://snapshot.debian.net/archive/YYYY/MM/DD/debian unstable main contrib non-free
deb-src http://snapshot.debian.net/archive/YYYY/MM/DD/debian unstable main contrib non-free

or a relative date, like for ex:

deb http://snapshot.debian.net/archive/date/7-days-ago/debian unstable main contrib non-free

Finally we can get a list of all available versions for a particular package using:

1
2
deb http://snapshot.debian.net/archive pool <package>
deb-src http://snapshot.debian.net/archive pool <package>

For example for openssh you would add in your apt sources the following line:

1
deb http://snapshot.debian.net/archive pool openssh

and you would install the particular version using: apt-get install openssh=version

To get the line you need to add to your sources you can use the search box on the site, or as a shortcut browse to http://snapshot.debian.net/package/<name_of_the_package>, and for our example this will be: http://snapshot.debian.net/package/openssh

Hopefully you will never need to use the debian snapshot archive, but just in case you need to do that, it is refreshing to know that such a project exists and can be used.

Comments