Upgrading from Debian 6 – Squeeze to Debian 7 – Wheezy is a fairly straight forward process, but like with any upgrade things could go wrong an you have to make sure that recent backup or complete image in case of VPS is created before you start the process.
1. First of all make sure your package list are updates by running the following command:
sudo apt-get update
2. Step 2 would be running updates:
sudo apt-get upgrade
3. Now you will need to edit sources.list file and make sure we replace all instances of squeeze with wheezy. It should look something like this:
deb http://ftp.debian.org/debian/ wheezy main contrib non-free deb http://security.debian.org/ wheezy/updates main contrib deb-src http://security.debian.org/ wheezy/updates main contrib # squeeze-updates, previously known as 'volatile' # A network mirror was not selected during install. The following entries # are provided as examples, but you should amend them as appropriate # for your mirror of choice. # deb http://ftp.debian.org/debian/ wheezy-updates main contrib deb-src http://ftp.debian.org/debian/ wheezy-updates main contrib
4. Now its time to upgrade the system
sudo apt-get dist-upgrade:
Most of the problems in step 4 that we encounter so far relate to path variable which you will need to troubleshooter in the following way.
a. If you get any path related errors make sure your path is corrent issue following command:
b. In some cases /sbin /usr/sbin or others path statements may be missing . Fix this by running the following:
5. After successfully running sudo apt-get dist-upgrade last step would be to reboot your vps or server.
In some cases packages some packages are removed and not purged. In this case you will need to install this package again or in some cases purge it first .
1. apt-get remove --purge %packagename% 2. apt-get install %packagename%