Articles on: Linux server

Upgrading your Debian version

The following documentation applies only to an update of the Debian distribution. This distribution has been established and tested in Debian 7.0, Debian 8.0, Debian 9.0 and Debian 10.0. Before any manipulation, we strongly recommend that you back up your data, or your entire VPS (if your offer allows it). Although this documentation is theoretically risk-free, many different settings can lead to complications, which we will not discuss in this documentation. These complications can range from the simple unavailability of your services, to the loss of data or the total unavailability of the VPS.

This documentation is not recommended for our Linux VPS or Storage (LXC & OpenVZ) offers. Debian updates may result in an attempt to update the kernel, which is not supported on these two types of virtualization. This may result in a total unavailability of the VPS, and a reset obligation. The following documentation is therefore theoretically compatible with our LXC and OpenVz offers, however, we strongly recommend that you perform your updates in "fresh install" (acquisition of a new VPS installed on the new version, and migration of your data).

Updating a Debian distribution is done in a very simple way, in three main steps:

1/ Updating your packages via your current distribution

root@Helpdesk:~# apt-get update && apt-get upgrade

2/ Update your sources.list file

We save the previous file (to allow you to go back)

root@Helpdesk:~# cp /etc/apt/sources.list /etc/apt/sources.list.old

It replaces the version name of Debian :

If you switch from Debian 7 (Wheezy) to Debian 8 (Jessie)

root@Helpdesk:~# sed -i 's/wheezy/jessie/g' /etc/apt/sources.list

If you switch from Debian 8 (Jessie) to Debian 9 (Stretch)

root@Helpdesk:~# sed -i 's/jessie/stretch/g' /etc/apt/sources.list

If you switch from Debian 9 (Stretch) to Debian 10 (Buster)

root@Helpdesk:~# sed -i 's/stretch/buster/g' /etc/apt/sources.list

3/ We update the packages as well as the system.

root@Helpdesk:~# apt-get update && apt-get upgrade && apt-get dist-upgrade

If everything goes well, you will then be able to reboot your VPS, and check your version of Debian :

root@Helpdesk:~# cat /etc/debian_version10.7

Updated on: 17/10/2022

Was this article helpful?

Share your feedback


Thank you!