Using Old Debian Versions In Your sources.list
Author: Falko Timme
Follow me on Twitter
You might be in a situation where you have a sytem with an old Debian version that has reached end of life, like Etch, Sarge, Woody, etc., and a distribution upgrade is not an option for you (maybe because you have customized the system so much that you fear breaking the system by doing a distribution upgrade). The "normal" repositories for these old versions do not exist anymore, which means you cannot install new software or update existing packages using apt. This tutorial shows how you can modify your /etc/apt/sources.list to still get packages for your old Debian version using apt.
I do not issue any guarantee that this will work for you!
1 Preliminary Note
Please don't get me wrong - I don't want to promote not upgrading your Debian system to the latest stable version - in fact, I do recommend to do this.! But sometimes life isn't just as easy as that, and there might be situations where an upgrade is not an option. For situations like these I provide this tutorial.
2 Modifying /etc/apt/sources.list
After a Debian version has reached EOL (end of life), its repositories go to the Debian archive. Therefore we can use this archive to get packags for our distribution. The syntax for our /etc/apt/sources.list is as follows:
deb http://archive.debian.org/debian/ <version> main non-free contrib
deb-src http://archive.debian.org/debian/ <version> main non-free contrib
deb http://archive.debian.org/debian-security/ <version>/updates main non-free contrib
deb-src http://archive.debian.org/debian-security/ <version>/updates main non-free contrib
So for Debian Etch, you'd comment out all other repositories in /etc/apt/sources.list and add the following lines:
deb http://archive.debian.org/debian/ etch main non-free contrib deb-src http://archive.debian.org/debian/ etch main non-free contrib deb http://archive.debian.org/debian-security/ etch/updates main non-free contrib deb-src http://archive.debian.org/debian-security/ etch/updates main non-free contrib
afterwards to update the packages database.
If you get an error like
W: There is no public key available for the following key IDs:
W: GPG error: http://archive.debian.org etch/updates Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9AA38DCD55BE302B
W: You may want to run apt-get update to correct these problems
just install the debian-archive-keyring package...
apt-get install debian-archive-keyring
... and run
- Debian: http://www.debian.org/