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 http://httpredir.debian.org/debian jessie main<br>deb http://httpredir.debian.org/debian jessie-updates main<br>deb http://security.debian.org jessie/updates main

The sources.list after the command.
deb http://httpredir.debian.org/debian stretch main<br>deb http://httpredir.debian.org/debian stretch-updates main<br>deb http://security.debian.org stretch/updates main

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