How To Upgrade Debian Squeeze To Wheezy

Want to support HowtoForge? Become a subscriber!
Submitted by falko (Contact Author) (Forums) on Mon, 2013-05-06 17:20. :: Debian

How To Upgrade Debian Squeeze To Wheezy

Version 1.0
Author: Falko Timme <ft [at] falkotimme [dot] com>
Follow me on Twitter
Last edited 05/06/2013

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:



6 Links

Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.
Submitted by vlatko175 (not registered) on Sat, 2014-10-11 22:33.
Thank's .
Submitted by Hoox (registered user) on Sat, 2014-04-12 22:56.
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.

Submitted by S (not registered) on Thu, 2013-08-01 14:54.
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

Submitted by deor (registered user) on Thu, 2013-06-27 15:15.

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.

Submitted by Hoox (registered user) on Wed, 2014-03-12 14:30.

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

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

Submitted by admin (registered user) on Wed, 2014-03-12 21:44.
The procedure works for ispconfig Servers as well.
Submitted by GTB (registered user) on Tue, 2013-06-25 19:58.

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 %u@%r


Submitted by Zwamkat (not registered) on Sun, 2013-09-08 09:37.
At first I had this commented out. Your solutions seems to be the right fix. Cheers.
Submitted by Maciej (not registered) on Wed, 2013-06-05 09:47.

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:



Submitted by SamTzu (registered user) on Sun, 2013-05-26 21:18.

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.

Submitted by radim_h (registered user) on Sat, 2013-06-01 15:18.
You saved my day!
Submitted by Stephen Angelico (not registered) on Thu, 2013-05-23 04:47.
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.
Submitted by Anonymous (not registered) on Tue, 2013-05-21 13:57.
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.
Submitted by Grant (not registered) on Wed, 2013-05-08 22:04.

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.

Submitted by SamTzu (registered user) on Thu, 2013-05-30 10:34.
You should start using byobu.
Submitted by Al Nonymous (not registered) on Wed, 2013-05-08 16:10.
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
Submitted by s1c (not registered) on Fri, 2013-05-24 14:52.
good point