Update and upgrade first
apt-get update
apt-get upgrade
Remove the unused
apt-get autoremove
Run dist upgrade
apt-get dist-upgrade
Check current release information
lsb_release -a
Review the sources.list
cat /etc/apt/sources.list
Modify the sources.list to debian 9 source
sed -i 's/jessie/stretch/g' /etc/apt/sources.list
Review it again
cat /etc/apt/sources.list
Update it
apt-get update
Check how many space should be used
apt-get -o APT::Get::Trivial-Only=true dist-upgrade
Check current space
df -H
All fine, then upgrade it
apt-get upgrade
Run the dist upgrade
apt-get dist-upgrade
Check the latest version
lsb_release -a
Check the kernel version
uname -mrs
Finllay, reboot it (not required), and check the kernel again
shutdown -r now
uname -mrs