Upgrade Debian 6 Squeeze to 7 Wheezy

Debian 7 (Wheezy) is the most recent stable version of Debian Linux, released in May 2013. This guide explains how to upgrade your system from Debian 6 (Squeeze) to Debian 7. These steps can be preformed as an in place upgrade on a live system from either a local terminal or SSH session to a remote system.


Before getting started, we suggest you Learn Linux Basics and follow these precautions.

Steps to follow

Step 1

Prior to upgrading, make sure the current system is up-to-date:

apt-get update && apt-get upgrade

Step 2

Begin the upgrade by switch Debian repositories, edit your source list:

vi /etc/apt/sources.list

Replace all instances of "squeeze" with "wheezy", for example:

deb http://debian.osuosl.org/debian squeeze main non-free contrib
deb-src http://debian.osuosl.org/debian squeeze main non-free contrib

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://debian.osuosl.org/debian squeeze-updates main contrib non-free
deb-src http://debian.osuosl.org/debian squeeze-updates main contrib non-free

Becomes:

deb http://debian.osuosl.org/debian wheezy main non-free contrib
deb-src http://debian.osuosl.org/debian wheezy main non-free contrib

deb http://security.debian.org/ wheezy/updates main contrib non-free
deb-src http://security.debian.org/ wheezy/updates main contrib non-free

# wheezy-updates, previously known as 'volatile'
deb http://debian.osuosl.org/debian wheezy-updates main contrib non-free
deb-src http://debian.osuosl.org/debian wheezy-updates main contrib non-free

Note: Your source list may or may not contain supplemental packages from contrib and non-free archives.
Step 3

Update the package index:

apt-get update

Step 4

Update minimal base system:

apt-get upgrade

Step 5

Update rest of the system:

apt-get dist-upgrade

Step 6

Reboot the system:

reboot

Step 7

Verify your release is now Debian 7.x

$ lsb_release -a

Output will be similar to this:

No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 7.0 (wheezy)
Release: 7.0
Codename: wheezy
Step 8

Verify Kernel version:

uname -mrs

Output will be similar to this:

Linux 3.2.0-4-amd64 x86_64
Step 9

Optionally, you may want to free up some disk space by clearing the local repository of retrieved package files.

apt-get clean



Category: 
Tags: