There is a new version of this tutorial available for Debian 11 (Bullseye).

How To Upgrade Debian Squeeze To Wheezy

Version 1.0
Author: Falko Timme <ft [at] falkotimme [dot] com>
Follow me on Twitter

The new Debian Wheezy has just been released. This tutorial explains how to upgrade your system from Debian Squeeze to Debian Wheezy.

As with all upgrades, begin with a backup of your critical data, and that will be the users data in /home/your-users but I would also back up the content of all configurations files. The latter can quickly be archived:

tar -czvf host.etc.tar.gz /etc

Move your files for safe storage on a backup drive.


1 Edit your Apt sources list file

To prepare for the installer, we need to get to a point where the package system is in a clean state. Move the preferences file from the directory if used. If you have a very complicated Debian source file, I would recommend that this is simplified to near the original install.

Open up a command line editor and reduce /etc/apt/sources.list to something similar to only:

vi /etc/apt/sources.list
deb squeeze main contrib non-free
deb-src squeeze main contrib non-free

deb squeeze/updates main contrib non-free
deb-src squeeze/updates main contrib non-free

# squeeze-updates, previously known as 'volatile'
deb squeeze-updates main contrib non-free
deb-src squeeze-updates main contrib non-free

Naturally your country code is likely to be different from mine de.


2 Update The Packages For Squeeze

With a few commands we will make sure that the existing package system is in good shape before the system is upgraded to Wheezy.

apt-get update

Ready for first upgrade:

apt-get upgrade

Follow this with:

apt-get dist-upgrade


3 Check That No Packages Are On Hold Or In Any Half Installed State

The system usually contains many many packages, and before the real upgrade stage we must fix such problem packages.

Ensure that we do not have any packages on hold with:

dpkg --audit 
dpkg --get-selections | grep hold

No packages can be on hold.

For the final go ahead test use:


Press g and the list shows which packages need your attention. Fix any packages in the action list, until the message says:

No packages are scheduled to be installed, removed or upgraded

Only then you are done and ready to pass this point.


4 Update sources.list For Wheezy

Update once more the /etc/apt/sources.list:

vi /etc/apt/sources.list
deb wheezy main contrib non-free
deb-src wheezy main contrib non-free
deb wheezy-updates main contrib non-free
deb wheezy/updates main contrib non-free

and at the command line type:

apt-get update


5 Wheezy Upgrade In Two Careful Steps

It's recommenced to use a two stage upgrade approach. After the first completed the full distribution upgrade is performed. Start with the upgrade like so:

apt-get upgrade

Afterwards we perform the full distribution upgrade:

apt-get dist-upgrade

Instead of using apt-get upgrade and apt-get dist-upgrade, you can also use the following commands, but please note that on it reads "The upgrade process for some previous releases recommended the use of aptitude for the upgrade. This tool is not recommended for upgrades from squeeze to wheezy.". For me, aptitude has worked fine for all Squeeze to Wheezy upgrades so far.

aptitude update
aptitude full-upgrade

Finally, reboot into your new Debian Wheezy system:



Share this page:

22 Comment(s)