Using Old Debian Versions In Your sources.list

Want to support HowtoForge? Become a subscriber!
 
Submitted by falko (Contact Author) (Forums) on Thu, 2011-09-15 11:31. :: Debian

Using Old Debian Versions In Your sources.list

Version 1.0
Author: Falko Timme <ft [at] falkotimme [dot] com>
Follow me on Twitter
Last edited 09/14/2011

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:

vi /etc/apt/sources.list

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

Run

apt-get update

afterwards to update the packages database.

If you get an error like

W: There is no public key available for the following key IDs:
9AA38DCD55BE302B
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

apt-get update

again.

 

3 Links


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.
Submitted by Roy (not registered) on Sat, 2013-11-02 01:22.
Thanks very much.

Solved the issue with an embedded system TS-7800 running Debian Etch.

 

 

Submitted by Anonymous (not registered) on Thu, 2013-06-13 15:42.

Thanks a lot! 

Submitted by Thomas (not registered) on Tue, 2012-06-26 10:25.
Thank you very much ! I was struggling to find where the archived sources where located.
Submitted by Anderson (not registered) on Sun, 2011-09-18 02:27.

This is what I have been looking for!

 

Thank you!

Submitted by Louis (not registered) on Sat, 2011-09-17 21:06.

I think this is a half complete howto, and yes how you are suggesting works ok.

Ik thinks you better use the folder /etc/apt/sources.list.d/  for adding files.
add a file like etch.list in this and put everything for etch in it.

i have for example.

debian-backports.list
debian-updates.list
testing.list
unstable.list

each contains its ow lines which you can enable or disable.

when using multiple version ( like stable/testing/unstable) you need to be in control
which version is installed. this is done with /etc/apt/preferended.d
you also put files in here. for me it is.

squeeze-backports
stable
stable-updates
testing
unstable

this files contains these lines :
Package: *
Pin: release a=squeeze-backports
Pin-Priority: 300
Package: *
Pin: release a=stable
Pin-Priority: 990
Package: *
Pin: release a=stable-updates
Pin-Priority: 200
Package: *
Pin: release a=testing
Pin-Priority: 200
Package: *
Pin: release a=unstable
Pin-Priority: 50

I like to keep it separeted, but you can put it in one file. ( same for the sources files )
you can read more about pinning here : http://wiki.debian.org/AptPreferences 
in above example only stable is installed, but if needed i can pull file of every tree.

Priorities (P) assigned in the APT preferences file must be positive or
negative integers.  They are interpreted as follows (roughly speaking):

 P > 1000
   causes  an  instance  to be installed even if this constitutes a
   downgrade of the package

 990 < P <=1000
   causes an instance to be installed even if it does not come from
   the target release, unless the installed instance is more recent

 500 < P <=990
   causes an instance to be installed unless there is  an  instance
   available  belonging to the target release or the installed ver-
   sion is more recent

 100 < P <=500
   causes an instance to be installed unless there is  an  instance
   available  belonging to some other distribution or the installed
   version is more recent

 0 <= P <=100
   causes an instance to be installed only if there is no installed
   instance of the package

 P < 0  prevents the instance from being installed