Need help? Chat now!

Hostwinds Tutorials

Search results for:


Table of Contents


Configure Apt Sources
Perform the Distribution Upgrade

How to Upgrade from Debian 9 (Stretch) to Debian 10 (Buster)

Tags Debian 

Configure Apt Sources
Perform the Distribution Upgrade

Debian 10 (Buster) was released in July 2019, and you may be looking to upgrade from Debian 9 (Stretch). The end of Debian Long Term Support for Debian 10 is not yet announced. Debian 9 will receive Long Term Support through June 2022.

While Hostwinds offers the ability to reinstall your VPS operating system, this would erase any data on the server.  Instead, you can take a precautionary snapshot of the VPS if you are not using Hostwinds cloud backups. With a backup in hand, you can proceed with the upgrade.

Configure Apt Sources

Start by backing up the file /etc/apt/sources.list:

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

Next, update the file /etc/apt/sources.list so all references to Stretch are replaced with Buster:

sudo sed -i 's/stretch/buster/g' /etc/apt/sources.list

Then update and upgrade all installed packages:

sudo apt update && sudo apt upgrade -y

Perform the Distribution Upgrade

Now you can perform the distribution upgrade using the command below:

sudo apt full-upgrade

It is recommended to remove all no longer required packages. Lastly, reboot:

sudo apt --purge autoremove
sudo reboot

Now you may verify your release version:

lsb_release -a

If you see the output below, you have completed the upgrade from Debian 9 to Debian 10!

No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 10 (buster) Release: 10 Codename: buster

Written by Benjamin Bream  /  June 25, 2020