This tutorial exists for these OS versions
- Debian 10 (Buster)
- Debian 9 (Stretch)
- Debian 8 (Jessie)
- Debian 7 (Wheezy)
- Debian 6 (Squeeze)
On this page
How To Upgrade Debian Squeeze To Wheezy
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:
deb http://ftp.de.debian.org/debian/ squeeze main contrib non-free deb-src http://ftp.de.debian.org/debian/ squeeze main contrib non-free deb http://security.debian.org/ squeeze/updates main contrib non-free deb-src http://security.debian.org/ squeeze/updates main contrib non-free # squeeze-updates, previously known as 'volatile' deb http://ftp.de.debian.org/debian/ squeeze-updates main contrib non-free deb-src http://ftp.de.debian.org/debian/ 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.
Ready for first upgrade:
Follow this with:
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 --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:
deb http://ftp.de.debian.org/debian wheezy main contrib non-free deb-src http://ftp.de.debian.org/debian wheezy main contrib non-free deb http://ftp.de.debian.org/debian wheezy-updates main contrib non-free deb http://ftp.de.debian.org/debian-security wheezy/updates main contrib non-free
and at the command line type:
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:
Afterwards we perform the full distribution upgrade:
Instead of using apt-get upgrade and apt-get dist-upgrade, you can also use the following commands, but please note that on http://www.debian.org/releases/wheezy/amd64/release-notes/ch-upgrading.en.html 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.
Finally, reboot into your new Debian Wheezy system:
- Debian: http://www.debian.org/
- Debian Wheezy Release Notes: http://www.debian.org/releases/wheezy/amd64/release-notes/