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)
March 29, 2018
1. Update all currently installed packages to the latest version
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 http://ftp.debian.org/debian/ stretch main
deb http://security.debian.org/ 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
4. Upgrade all packages
5. After upgrading all packages, restart the system
Your system is now upgraded to Debian Linux 9 (Stretch)