Upgrade Debian 9 to Debian 10

Upgrade Debian 9 to Debian 10 is very similar to upgrading previous versions. The only you need to do is change the sources to Buster instead of Stretch. If you know how to do it, just scroll down and copy the sources. The instructions in this article assume root. You can not delete sources.list with sudo.

Long time support for Debian 9 is expected to last until June 2022. So there is no rush to update. But since Debian 10 has been out for more than half a year, so why not.

Warning: Before updating you should make a backup unless you have nothing of importance on your system. A quick backup tips if you are running Debian 9 on VirtualBox, is to just take a snapshot. For some applications like MySQL and Apache, and probably lots of others, it is a good idea to keep your current configs instead of using the package maintainers config. That will most likely mess up your installation. So please make a backup before you proceed.

To verify your Debian version, you can check the /etc/debian_version

cat /etc/debian_version
9.12

You can also check the kernel version. You do that by running uname -a.

uname -a
Linux web 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1+deb9u5 (2019-08-11) x86_64 GNU/Linux

Before doing any upgrades, it is a good idea to update your packages first.

apt update
apt upgrade

With your system up to date on packages, it is time to upgrade to Debian 10. The first thing we do is to delete the sources.list file. You can delete the content and keep the file by doing:

> etc/apt/sources.list

With an empty sources.list, you can just copy the sources below and paste them into your own sources. Open your favorite text editor and paste in the sources.

deb http://ftp.debian.org/debian/ buster main contrib non-free
deb-src http://ftp.debian.org/debian/ buster main contrib non-free

deb http://security.debian.org/ buster/updates main contrib
deb-src http://security.debian.org/ buster/updates main contrib

deb http://ftp.debian.org/debian/ buster-updates main contrib non-free
deb-src http://ftp.debian.org/debian/ buster-updates main contrib non-free

Now we will need to upgrade the packages to Debian 10.

apt update
apt upgrade

With updated packages, we can upgrade the distro.

apt dist-upgrade

Your system is now updated. But you will have a lot of outdated packages you can remove.

apt autoremove

Reboot your system and verify the kernel again with uname -a. It should show a newer version than previously. You can also check the /etc/debian_version file.

After the upgrade I have this kernel:

Linux web 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26) x86_64 GNU/Linux

So this is how to upgrade Debian 9 to Debian 10. Enjoy your updated system. Debian 10 LTS will probably be around until 2024.

If you are looking to Upgrade Debian 8 to Debian 9.

Download Debian here.

Enjoy!

About Author

Related Posts

php8 gd

PHP8 gd Activate after installation

PHP8 GD activate after installation. GD doesn’t get activated by default. Not even a reboot after installation will activate it. So how do we do it? In…

Debian 12: linux-image-6.1.0-10amd64

Troubleshooting dependency issues in Debian 12: Resolving linux-image-6.1.0-10amd64 package dependency problems. If you installed the Debian 12 from the live image the issue is the raspi-firmware. Even…

OpenMediaVault default password

OpenMediaVault default password

OpenMediaVault default password is printed in the documentation. I did not see it the first time I installed it either. So I had to do some detective…

Debian change dns

Debian change DNS settings to a new DNS

Debian change DNS settings for speed improvement or privacy. It is really easy to do. So let us see how it’s done and get to it. The…

Debian 10 Static IP

Debian 10 Static IP

Debian 10 static IP works just like the previous version. They changed the naming of the network interfaces in Debian 9. However if you have upgraded from…

Install .net core on Debian 10

Install dotnet core on Debian 10

Install dotnet core on Debian 10 is essential to run dotnet core application on Debian. This time Microsoft has done it easy to install dotnet core 3…

Leave a Reply