Search The Hostwinds Guides Knowledge Base

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

Share This Article [TheChamp-Sharing]

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 the operating system of your VPS, 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 like 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

Related Articles