Upgrade Debian 7 Wheezy to 8 Jessie



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

Updated: 2019-04-23
Created: 2015-04-28

Debian 8 (Jessie) is the most recent stable version of Debian Linux, released in April 2015. This guide explains how to upgrade your system from Debian 7 (Wheezy) to Debian 8.

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.

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 switching Debian repositories from Wheezy to Jessie. This is accomplished in one of two ways; using the sed command to search and replace all instances automatically, or by editing the source file manually. Choose whichever option you prefer.

Search & Replace with sed.

sed -i 's/wheezy/jessie/g' /etc/apt/sources.list

Or edit your source list manually.

vi /etc/apt/sources.list

Replace all instances of "wheezy" with "jessie", for example.

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

Becomes.

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

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

# jessie-updates, previously known as 'volatile'
deb http://debian.osuosl.org/debian jessie-updates main contrib non-free
deb-src http://debian.osuosl.org/debian jessie-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

Upgrade the minimal base system.

apt-get upgrade

Step 5

Upgrade all other packages and dependencies.

apt-get dist-upgrade

Step 6

Reboot the system.

reboot

Step 7

Verify your release is now Debian 8.

lsb_release -a

Output will be similar to this.

No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 8.0 (jessie)
Release: 8.0
Codename: jessie

Step 8

Verify Kernel version.

uname -mrs

Output will be similar to this.

Linux 3.16.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