Debian is a popular version, or fork, of the Linux operating system.
The most recently released version is Debian 10, codenamed Buster. The previous version Debian 9 Stretch is officially supported until June 2022. The newer version offers a longer support period and new features, so it is highly recommended to upgrade if running Debian 9.
This tutorial will walk you through how to upgrade from Debian 9 (Stretch) to Debian 10 (Buster).
Step 1: Update Package Manager and Repositories
By default, Debian 9 refers to the repositories designated for Stretch.
1. First, create a backup copy of the /etc/apt/sources.list file:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
2. Then, open the file for editing
sudo nano /etc/apt/sources.list
3. Change all the references in this file from Stretch to Buster. The entries should appear as follows:
deb http://deb.debian.org/debian debian buster main deb http://deb.debian.org/debian buster-updates main deb http://deb.debian.org/debian buster/updates main
4. Save the file
# sed -i 's/stretch/buster/g' /etc/apt/sources.list
Step 2: Upgrade from Debian 9 to Debian 10
1. Update the local package lists:
sudo apt-get update
2. Next, run updates on the software packages to prepare for the operating system upgrade:
sudo apt-get upgrade
3. Finally, run the distribution upgrade:
sudo apt-get dist-upgrade
4. Once the process completes, reboot the system to boot into Debian 10 Buster:
- How to upgrade Debian 8 Jessie to Debian 9 Strech
- How to install docker on Debian 9 Stretch
- howto upgrade mariadb 10.x to 10.3.x on Centos 7
- How to fix ‘add-apt-repository command not found’ Error on Ubuntu and Debian
- debian / ubuntu dig command not found