March 6, 2021


Upgrade Debian 7 to Debian 8 and it is time to upgrade

Upgrade debian 7 to Debian 8

Upgrade Debian 7 to Debian 8 is needed before upgrading to Debian 9 and 10. If your Debian 7 computer is connected to internet you need to upgrade. Debian 7 reached end of life for updates 31st of May 2018. So updating is long overdue. 

It is easy, safe and simple to update your Debian 7 to a newer version. You can only update one version at the time. So if you want to update to Debian 10, you need to update to version 8 and 9 before 10.

For lower-end CPUs, this is going to take some time tho. There is a lot of packages that need to be downloaded and installed.

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!

If you have a updated Debian 7 system and check the version number you should see something like this when checking the version number.

cat /etc/debian_version 

First, you need to change sources.list to be able to upgrade Debian 7 to Debian 8. You need to change the sources.list to Jessie (Debian 8). To delete the content of your current sources.list, you need to be root (sudo will not have access to delete it).

> /etc/apt/sources.list

Run your favourite editor like vim, nano, emacs, etc. I like vim.

vim /etc/apt/sources.list

Copy and paste this (Jessie sources.list)

# jessie contrib main 

deb jessie main contrib non-free
deb-src jessie main contrib non-free

deb jessie/updates main contrib
deb-src jessie/updates main contrib

deb jessie-updates main contrib non-free
deb-src jessie-updates main contrib non-free

You can then run the following commands in the following order. In short we now need to update your systems packages and upgrade the ones that needs to be upgrade. Then we run the distro upgrade command to upgrade the kernel and all needed packages for Debian 8.

apt-get update

apt-get upgrade

apt-get dist-upgrade

After upgrading Debian 7 to Debian 8 you will probably have a lot of packages on your system that is not needed anymore. You can remove them with the command below.

apt-get autoremove

Since your kernel now have been updates you need to reboot. To verify this you can check the kernel version before and after the reboot.

uname -a
Linux db1 3.2.0-6-amd64 #1 SMP Debian 3.2.102-1 x86_64 GNU/Linux

After the reboot you should see a difference in the kernel version number.

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

You should now have a Debian 8 system instead of Debian 7. Debian 8 is still at this moment supported and you have a safer system.

If you are looking for the faster Debian mirror check out the link.