Debian Lenny is now stable, so here is a quick guide to upgrading. I would recommend taking backups before doing this, and not performing this upgrade on a live/production machine.

Edit /etc/apt/sources.list

Replace ‘etch’ with ‘lenny’ – in my case:

deb http://mirror.ox.ac.uk/debian/ etch main
deb-src http://mirror.ox.ac.uk/debian/ etch main

deb http://security.debian.org/ etch/updates main contrib
deb-src http://security.debian.org/ etch/updates main contrib

TO

deb http://mirror.ox.ac.uk/debian/ lenny main
deb-src http://mirror.ox.ac.uk/debian/ lenny main

deb http://security.debian.org/ lenny/updates main contrib
deb-src http://security.debian.org/ lenny/updates main contrib

Then issue:

apt-get clean
apt-get update
apt-get dist-upgrade