Update Debian Lenny to Squeeze

Debian LinuxThe upgrade between major releases for Debian system is quite easy compared to RHEL / CentOS.

How can I upgrade to Debian GNU/Linux 6.0 (Squeeze) from the previous Debian 5.0 (Lenny) remotely?

The upgrades can be handled well by the command apt-get. Anyway before running the upgrade, it’s highly suggested to make a backup – at least the most important part of your system should be backup-ped. The official Debian document recommends:

The main things you’ll want to back up are the contents of /etc, /var/lib/dpkg, /var/lib/apt/extended_states and the output of dpkg –get-selections “*” (the quotes are important). If you use aptitude to manage packages on your system, you will also want to back up /var/lib/aptitude/pkgstates.

Let’s start the Debian Squeeze upgrade now. Firstly edit the file called /etc/apt/sources.list, enter:

# vi /etc/apt/sources.list

Replace the word “lenny” with “squeeze“, the it should look as follows:

deb http://ftp.us.debian.org/debian/ squeeze main
deb http://security.debian.org/ squeeze/updates main

These two lines are important for our upgrade, and you may have other lines inside, they don’t make much sense. Save and close the file. Type the following commands:

# apt-get update
# apt-get install apt dpkg aptitude
# apt-get dist-upgrade

When they all finish smoothly, it’s time to reboot the server. After a reboot make sure all services are running:

# lsb_release -a
# tail -f /var/log/messages
Share Button

One thought on “Update Debian Lenny to Squeeze

Leave a comment

Your email address will not be published. Required fields are marked *