How to upgrade to Debian Linux 9 (stretched)

Follow these steps to upgrade your system from Debian Linux 8 (Jessie) to Debian Linux 9 (Stretch).

This tutorial has been tested on the following Linux distributions:

Debian Linux 8 (Jesse)

Last updated:
March 29, 2018

1. Update all currently installed packages to the latest version

apt-get update
apt-get upgrade

2. Using your favorite text editor (such as pico /etc/apt/sources.list), replace all occurrences of jessie with Stretch in the apt source file /etc/apt/sources.list.

This is an example of how the file looks after the change:

deb stretch main
deb stretch/updates main

Alternatively, you can replace the reference to the repository with the sed command:

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

3. Update apt package index

apt-get update

4. Upgrade all packages

apt-get upgrade
apt-get dist-upgrade

5. After upgrading all packages, restart the system


Your system is now upgraded to Debian Linux 9 (Stretch)

Source link