There is a new version of this tutorial available for Debian 11 (Bullseye).

How to Upgrade from Debian 9 to Debian 10

Debian 10, codenamed "Buster," is the latest version of the popular Linux distribution. Released in July 2019, Debian 10 provides a wealth of new features and improvements over previous versions. Here are some highlights:

Kernel Upgrade

The kernel has been updated to Linux 4.19, offering better performance and support for modern hardware. This is a major version upgrade from Debian 9, which included Linux 4.9.

Security Improvements

Debian 10 includes many security enhancements including an improved AppArmor parser, support for enhanced user-space hardening with stack clash protection, and hardened memory protections on architectures such as x86-64. There are also new tools to help harden services like SSH, Postfix and Apache2.

Improved Desktop Environment

On top of supporting the GNOME 3 desktop environment, Debian 10 also offers KDE Plasma 5 as well as Xfce as choices for users looking for an alternate desktop experience. All three environments offer improved usability over their predecessors along with the ability to customize them to suit user needs better.

Improved Package Management

Debian 10 includes a refreshed package management system that offers increased flexibility when installing and managing packages from repositories such as SNAP or Flatpak while still supporting classic .deb packages. Additionally, there are automated tools like aptitude to help simplify package management even further!

Before upgrading to Debian 10, you should do the following things:

  • Back up all your files on the external drive.
  • Make sure you have a stable internet connection.
  • Disable any external repository.

In this article, I will show you how to upgrade from Debian version 9 to the new Debian 10 in a few easy steps.

Prerequisites

  • A server that is running Debian 9.
  • A root password is configured on the server.

Update the System

First, you must update and upgrade all your system packages to the latest version. Run the following command to update and upgrade all packages:

apt-get update -y
apt-get upgrade -y
apt-get dist-upgrade -y

Next, remove all unwanted packages with the following command:

apt-get autoremove

Next, clean up the APT package cache with the following command:

apt-get clean

Next, restart your system to apply all updates:

reboot

After restarting the system, verify your operating system version using the following command:

lsb_release -a

You should see a similar output:

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

Update Debian 9 Repository with Debian 10

Next, you need to update the Debian 9 repository with Debian 10 to download and get the update.

To do this, you can update all source files by running these commands:

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

Or edit the APT source file manually with the following command:

nano /etc/apt/sources.list

Replace "stretch" with "buster". The result should be similar to the one below:

deb http://deb.debian.org/debian buster main contrib non-free
deb http://deb.debian.org/debian buster-updates main contrib non-free
deb http://deb.debian.org/debian buster-backports main contrib non-free
deb http://security.debian.org/debian-security buster-security main

Save and close the file when you are finished if there are more APT source files in /etc/apt/sources.list.d/, edit these by replacing "stretch" with "buster".

Upgrade Debian 9 to Debian 10

At this point, your Debian 9 server is ready for the upgrade.

First, update the repository to apply the changes you made in the previous step.

apt-get update -y

Now we will update existing packages without installing new ones:

apt upgrade --without-new-pkgs -y

Once your repository is updated, run the following command to start the upgrade:

apt-get full-upgrade -y

Once your system has been upgraded, restart it to apply all the updates.

reboot

Verify Debian 10 Upgrade

At this point, your Debian 9 server is upgraded to Debian 10. You can now verify it using the following command:

lsb_release -a

You should see the Debian 11 version in the following output:

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

Conclusion

The above guide explains how to upgrade from Debian version 9 to Debian 10. I hope you can now upgrade your Debian 10 without any hassle.

Share this page:

2 Comment(s)