Debian

Upgrade Debian 9 Stretch to Debian 10 Buster

Debian 10 Buster was released recently. Debian 10 comes with Linux Kernel 4.19, GNOME 3.30, KDE Plasma 5.14, Cinnamon 3.8, LXDE 0.99.2, LxQt 0.14, MATE 1.20, Xfce 4.12 and many more. Debian 10 also comes with awesome new artworks.

Debian may be your daily driver. So, you may have a lot of important files and softwares in your Debian 9 installation. In that case, you can simply upgrade your existing Debian 9 installation to Debian 10.

In this article, I am going to show you how to upgrade your existing Debian 9 Stretch installation to Debian 10 Buster.

Setting Up Package Repositories:

Before you update Debian 9 Stretch to Debian 10 Buster, you have change the package repository URL of Debian 9 Stretch to Debian 10 Buster.

First, open the /etc/apt/sources.list configuration file as follows:

$ sudo nano /etc/apt/sources.list

The sources.list file should be opened. As you can see, I have Debian 9 Stretch package repositories in there. To change the package repository to Debian 10 Buster, you simply have to replace stretch to buster. To do that, press <Ctrl> + \

Now, type in stretch as the search string and press <Enter>.

Now, type in buster as the replace string and press <Enter>.

Now, press A.

All the instances of stretch should be replaced by buster. Now, save the file by pressing <Ctrl> + X followed by Y and <Enter>.

Upgrading to Debian 10 Buster:

Now, update the package APT package repository cache with the following command:

$ sudo apt update

The APT package repository cache should be updated. As you can see, the Debian 10 Buster package repositories are working. There are a lot of packages to be upgraded.

Before I do any upgrade, I just want to show you the output of the lsb_release command:

$ lsb_release -a

As you can see, I am running Debian 9 Stretch. Let’s upgrade it to Debian 10 Buster.

Now, upgrade all the software packages with the following command:

$ sudo apt upgrade

You should see a summary of the upgrade. To confirm the upgrade, press Y and then press <Enter>.

All the required packages will be downloaded from the internet. It will take a while to complete.

Once the packages are downloaded, APT will show you some news and ask you some questions. The first news you might see is as follows. Just press Q to continue.

Once you see this, press <Enter>.

Press <Enter> again.

Now, APT will ask you whether it can restart system services automatically while upgrading.

If it is not a production machine, then I recommend that you let APT upgrade system services automatically as required. In that case, select <Yes>.

If it’s a production machine on which some very important services are running on your computer/server, then you may want to be prompted when APT needs to restart any system services. In that case select <No>.

Press <Enter>.

All the software packages should be upgraded.

Now, your system is ready to do a distribution upgrade.

To do a distribution upgrade, run the following command:

$ sudo apt dist-upgrade

Now, press Y and then press <Enter> to confirm the distribution upgrade.

All the required packages for the distribution upgrade will be downloaded and installed.

At this point, the distribution upgrade should be completed.

Now, reboot your computer/server with the following command for the changes to take effect.

$ sudo reboot

Once your computer boots, you will see some noticeable changes here and there.

I also ran the lsb_release command. As you can see from the output, the upgrade to Debian 10 Buster was successful.

$ lsb_release -a

The Linux kernel should also be upgraded to 4.19 as you can see in the screenshot below.

So, that’s how you upgrade your existing Debian 9 Stretch installation to Debian 10 Buster. Thanks for reading this article.

About the author

Shahriar Shovon

Freelancer & Linux System Administrator. Also loves Web API development with Node.js and JavaScript. I was born in Bangladesh. I am currently studying Electronics and Communication Engineering at Khulna University of Engineering & Technology (KUET), one of the demanding public engineering universities of Bangladesh.