Upgrade Debian from stretch to buster 10

This tutorial will walk you through how to upgrade from Debian 9 (Stretch) to Debian 10 (Buster)

In your Debian 9 stretch terminal, backup your sources.list then upgrade the entire system.

// Open apt dir
cd /etc/apt

// Make sources.list backup
mv sources.list sources.list.bak

// Create new sources.list
nano sources.list

// Paste this 

deb http://cdn-fastly.deb.debian.org/debian/ buster main
deb-src http://cdn-fastly.deb.debian.org/debian/ buster main
deb http://cdn-fastly.deb.debian.org/debian/ buster-updates main
deb-src http://cdn-fastly.deb.debian.org/debian/ buster-updates main
deb http://security.debian.org/debian-security buster/updates main
deb-src http://security.debian.org/debian-security buster/updates main
deb http://cdn-fastly.deb.debian.org/debian experimental main

// clean and update
apt clean all && apt update && apt dist-upgrade

Finally, verify your system version with the following command

hostnamectl

// Will return 
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Photo by Milivoj Kuhar on Unsplash