Upgrading from Debian Squeeze to Debian Wheezy

Debian LogoThe latest Debian stable version named Wheezy was recently released. It is possible to upgrade from Squeeze to Wheezy without reinstalling the operating system from scratch. Let’s look at how that can be done.

Before we begin…

This guide is for those servers that only use the default Debian repositories. If you are using dotdeb or other third party repositories you will need to research things a little more.

Also consider whether you want to upgrade at all? Squeeze will continue to be supported for a year more so there is no urgent need to upgrade.

If you’ve decided to take the plunge just follow these steps.

Upgrading Debian Squeeze to Wheezy

The first step is, of course, to backup your server. At the very least you should backup the configuration files in /etc/ as well as any user data in /home. But a full backup would be best.

Next, login as root.

If you are upgrading remotely via SSH start up a screen session (just type screen). You do this in case you loose your Internet connection while the upgrade is happening. If that happens the screen session will continue to run and you can login again and reattach to it.

Next:

apt-get update; apt-get upgrade

To get the system up to date with the latest and greatest from the Squeeze line.

Then change the repositories over to Wheezy:

sed -i 's/squeeze/wheezy/' /etc/apt/sources.list

Update again:

apt-get update;

And now for the moment of truth:

apt-get dist-upgrade

After that it is just a matter of following on-screen prompts. If you are using Konsole as your terminal app it might help to check View > Monitor for Silence so you can do other stuff while this is happening.

After the update finishes you should reboot the system.

Leave a Reply

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