Debian Jessie to Stretch Upgrade

sudo apt update && sudo apt upgrade
Creating a backup of the sources.list.
cp /etc/apt/sources.list /etc/apt/sources.list.jessie-version
Converting Jessie mirrors to Stretch.
sed -i 's/jessie/stretch/g' /etc/apt/sources.list
You can verify that the command above has successfully worked by looking into the file with the help of nano.
The sources.list before the command.
deb jessie main<br>deb jessie-updates main<br>deb jessie/updates main

The sources.list after the command.
deb stretch main<br>deb stretch-updates main<br>deb stretch/updates main

Update the packages towards Stretch release.
sudo apt update && apt upgrade
Do a distribution upgrade.
sudo apt dist-upgrade