Upgrade Debian 8 to Debian 9

Upgrade Debian 8 to Debian 9 is done almost exactly like upgrade Debian 7 to Debian 8. It is just as easy and the only thing you need to change is the source list. So if you already know how to upgrade you can skip the article really. Just copy the source. 

Debian 8 will continue to live until June 2020. It will live as long as you want, but after June 2020 it will not receive any more updates. So then you are on your own. If you are not connected to the internet it is perfectly safe to continue to run an old Debian version. On the internet it is not recommended to run an outdated operating system.

WARNING: Always backup before upgrading your system. Unless there is nothing of importance and doesn’t matter if it is lost. If you are on a virtual machine like VirtualBox, just do a snapshot. It is quick and easy. If you run a MySQL database or Apache server make sure you answer that you keep your own configs instead of the package maintainers config. AND DO A BACKUP!

To confirm your Debian version you can check the file /etc/debian_version. The latest version at the moment is 8.11.

cat /etc/debian_version
8.11

It is always recommended to update all packages before starting the upgrade. So check if you need any updates first.

apt-get update
apt-get upgrade

Now we are ready to upgrade Debian 8 to Debian 9. The first thing we need to do is to change the source list. One solution to this is to replace all the Jessie sources to stretch, or just copy and paste the source list below. If you are root you can empty the source list before editing it.

> etc/apt/sources.list

Now your source list file will be empty. Open your favorite text editor and paste in the source below. This is the generic Debian source list. It might be faster if you find some in your own country. But this will work for everyone.

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

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

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

When the source list is updated we need to update the packages to Debian 9. We do that the usual way.

apt-get update
apt-get upgrade

When the packages have been upgraded we can start to update the distro it self.

apt-get dist-upgrade

Your system is now updated to run Debian 9. And you will have a lot of outdated packages you don’t need anymore. We will get rid of those with autoremove.

apt-get autoremove

Your kernel will have a newer version now. So you need to reboot your system to use the new kernel. To verify that the kernel is updated you can check the kernel version before you reboot. This is my kernel before the update. Your kernel might be newer.

uname -a
Linux db1 3.16.0-10-amd64 #1 SMP Debian 3.16.70-1 (2019-07-22) x86_64 GNU/Linux

After a reboot you should at least have this kernel or newer.

uname -a
Linux db1 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1+deb9u4 (2019-07-19) x86_64 GNU/Linux

That is how you upgrade Debian 8 to Debian 9. Now your system is running on the latest Debian 9 kernel. Debian 9 will be supported to 2022, probably around summer time.

Enjoy your new system.

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…

Upgrade debian 9 to debian 10

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…

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…

This Post Has One Comment

Leave a Reply