How to upgrade Debian Jessie to Debian Stretch

This short tutorial will show How to upgrade Debian Jessie to Debian Stretch.

Debian is a Unix-like computer operating system that is composed entirely of free software, most of which is under the GNU General Public License and packaged by a group of individuals participating in the Debian Project.

First, you need to have Linux server with Debian OS installed on it.If you don’t have Linux Server get it on VPSie.

After, log in to your server and follow these steps.

The first step is to fully upgrade your Debian Jessie system.You can do it by following commands:

To update:
apt-get update
To upgrade:
apt-get upgrade
To dist-upgrade
apt-get dist-upgrade

And to see on hold packages, if those packages make any problem follow this command

apt-mark showhold

Now it’s time to upgrade package repositories from Jessie to Stretch.
To do it edit /etc/apt/sources.list by following this command:

cp /etc/apt/sources.list /etc/apt/sources.list_backup

Now found keyword jessie and replace to stretch like this

From

1st Line

deb http://httpredir.debian.org/debian jessie main

2nd Line

deb http://httpredir.debian.org/debian jessie-updates main

3rd Line

deb http://security.debian.org jessie/updates main

To
1st Line

deb http://httpredir.debian.org/debian stretch main

2nd Line

deb http://httpredir.debian.org/debian stretch-updates main

3rd Line

deb http://security.debian.org stretch/updates main


Or you can replace automatically using sed command:

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

After replacing the lines go and update your packages

apt-get update

And to finish this, upgrade packages following those commands:

To upgrade
apt-get upgrade
To dist-upgrade
apt-get dist-upgrade

Now you successfully have upgraded you Debian from Jessie to Stretch.

Enjoy!

If you have questions you can always ping us on chat or open a support ticket for help.

Try us free for one full month today!

Related Articles