There is a new version of this tutorial available for Debian 10 (Buster).

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:

Suggested articles

22 Comment(s)

Add comment


By: Al Nonymous

One line in your Wheezy sources.list reads: deb wheezy/updates main contrib non-free It should read: deb wheezy/updates main contrib non-free

By: s1c

good point

By: Grant

I prefer to download first, before installing any updates, making it 5 steps:

Update the sources

apt-get update

apt-get dist-upgrade -d

apt-get upgrade

apt-get dist-upgrade

I have had issues in the past with a loss of network connectivity mid update causing serious issues.


You should start using byobu.

By: Anonymous

I skimmed through the steps, and didn't pay attention to the URL in the sources list.  I mistakenly cut and paste the sources.list, and "apt-get update" before I caught it.  I thought this would be useful.  I found a sources.list generator at  This will take care of any country code variations.

By: Stephen Angelico

Instead of copying and pasting the lines you have, or removing any non-Debian source lines, just change the Debian lines so that they say wheezy instead of squeeze, then do apt-get update, upgrade and dist-upgrade.


I tested this on ISPconfig3 cluster. Worked pretty well. Only thing that broke down was phpmyadmin (SSL). Browser tries to download the page.

Edit: This will fix this small problem...

vi /etc/apache2/mods-available/suphp.conf

<IfModule mod_suphp.c>

#<FilesMatch "\.ph(p3?|tml)$">
#  SetHandler application/x-httpd-suphp

AddType application/x-httpd-suphp .php .php3 .php4 .php5 .phtml
suPHP_AddHandler application/x-httpd-suphp


 Remember to restart Apache.


You saved my day!

By: Maciej

Thank you for the description.


In the case of the following trouble:

"E: Could not perform immediate configuration on ‘default-jre’"

it is worthwhile to have a look here:




I had after the Update this in my Log:

...  SASL PLAIN authentication failed: no mechanism available


Therefor you have to change this file:


auxprop_plugin: mysql

now has to be:

auxprop_plugin: sql
sql_engine: mysql

and %u  has to be replaced with %[email protected]%r


By: Zwamkat

At first I had this commented out. Your solutions seems to be the right fix. Cheers.


I read there (french discussion inside) that there might be some trouble with postfix when upgrading to wheezy.

Has someone experienced such trouble while upgrading to wheezy with ISPConfig installed?

 BTW: the fix of the mentionned problem is to comment the "#auxprop_plugin" line in /etc/postfix/sasl/smtpd.conf conf file.


deor, did you complete the wheezy upgrade with ISPConfig? Anything to note?

 Anyone else knows if this procedure is good with ISPConfig servers?

By: S

In one of our systems after dist-upgrade and reboot following error has occured:
(GRUB) error: symbol not found: 'grub_divmod64_full'

In order to fix this bug we had to launch into rescue mode and reinstall grub (with some downtime).

It order to prevent that, just reinstall grub right before final reboot with following command (for each disk separately):
grub-install --no-floppy --recheck /dev/sdX

By: admin

The procedure works for ispconfig Servers as well.


Thanks for the guide!

I made a blog post about my upgrade and the extra steps for ISPConfig. Also noted some of the errors I found after the upgrade.

By: vlatko175

Thank's .

By: Hans

Thanks !!!!

By: Nathan

Thank you so much! Definitely recommend you update the directions to recommend downloading first, because if I hadn't done that, I'd have been screwed due to wifi drivers. But this was one very fast upgrade even with the couple of snags!

By: Mihai

Worked fine, thanks!

BTW, I had to install the new kernel as in the previous tutorial "Squeeze upgrade in two careful steps" to get the upgraded system to boot.

By: Simon

What about the disk scpace needed for the new packages? df -h output for the /var directory says, I have 1,9G free space. Is it enugh?

By: treki

apt-get dist-upgrade...233 upgraded, 71 newly installed, 4 to remove and 0 not upgraded.Need to get 228 MB of archives.After this operation, 239 MB of additional disk space will be used.E: You don't have enough free space in /var/cache/apt/archives/.

I have increase memory in /etc/fstab from 150M to 300M like this:

tmpfs           /var/cache/apt/archives  tmpfs    size=300M         0       0

Now the dist-upgrade work.