Upgrading Debian 9 to Debian 10

Introduction

Debian 10 (Buster), is the successor to Debian 9 (Stretch). It was released on July 6, 2019. In this tutorial, we will be upgrading an existing Debian 9 installation to Debian 10.

Prerequisites

  • Root access to an existing server running Debian 9.
  • Basic knowledge of the Linux command line.

All commands in this tutorial should be run as root. If you are using a standard user, (your prompt doesn't end with #), you will need to prepend sudo to all commands. Alternatively, you can type sudo -i to switch to the root user.

Step 1: Preparation

Before upgrading, you should backup your server. Although Debian releases are generally stable, there is always a risk of something going wrong or an unexpected incompatibility. One option is to use Vultr backups or snapshots. Alternatively, you can use tools like borg or tar if you wish to store backups yourself.

Another important step is to check for broken packages. This can be done with dpkg --audit. If it fails, you can try to correct the issue with apt -f install or dpkg --configure -a. In the case of broken dependencies which cannot be resolved, aptitude -f install may be able to fix it (aptitude uses a more comprehensive dependency resolution method).

You will want to make sure you are aware of any changes made to packages, including configuration files, as you may need to reapply them later. Modified files belonging to packages can be found with dpkg --verify.

In addition, make sure you have a kernel metapackage like linux-image-amd64 installed. If you only have a package like linux-image-4.9.0-9-amd64 installed, your kernel may not be updated properly. You can ensure it is installed by running apt install linux-image-amd64.

If you use any third-party software, especially applications from third-party repositories, you need to ensure they are compatible with Debian 10 before upgrading.

Finally, if you have an unreliable network connection, you should perform the upgrade inside a screen or tmux session so the upgrade process can continue even if you lose connection.

Step 2: Updating all current packages

To minimize possible issues, all installed packages should be at the latest version prior to the release upgrade.

apt update
apt upgrade
apt autoremove --purge
reboot

If you notice any errors during the process, correct them before proceeding.

Step 3: Modifying package lists

Next, all package lists need to be updated from Stretch to Buster. You can do this manually with the following.

nano /etc/apt/sources.list /etc/apt/sources.list.d/*

Alternatively, you can do this automatically with sed.

sed -i "s:stretch:buster:g" /etc/apt/sources.list /etc/apt/sources.list.d/*

Step 4: Upgrading to Debian 10

Now, it is time to upgrade to Debian 10. First, update your package lists:

apt update

Next, upgrade the packages:

apt upgrade
apt dist-upgrade

During the upgrade, you may be asked if you would like to restart services. You can safely say no to this, as you will be rebooting later.

You may also be told there is a conflict between configuration files. If you are certain there are no breaking changes between versions, you can choose to keep the local version currently installed. If you are uncertain, you should show the differences between versions.

Finally, reboot into Debian 10.

reboot

Step 5: Cleanup

Ensure your server has been upgraded by running lsb_release -a. The output should look like the following.

No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 10 (buster)
Release:        10
Codename:       buster

You can remove any leftover dependencies with apt autoremove --purge.

Troubleshooting

If you have dependency problems which apt cannot resolve, using aptitude may help.

In the case that your system will not boot after the upgrade, you can use single-user mode to debug it. If this doesn't work, you can attach a live ISO to your virtual machine and chroot into your system to debug it.

Useful Resources



Leave a Comment

ZPanel y Sentora en CentOS 6 x64

ZPanel y Sentora en CentOS 6 x64

ZPanel, un panel de control de alojamiento web popular, se bifurcó en 2014 a un nuevo proyecto llamado Sentora. Aprende a instalar Sentora en tu servidor con este tutorial.

Cómo instalar Vtiger CRM Open Source Edition en CentOS 7

Cómo instalar Vtiger CRM Open Source Edition en CentOS 7

Aprende cómo instalar Vtiger CRM, una aplicación de gestión de relaciones con el cliente, en CentOS 7 para aumentar tus ventas y mejorar el servicio al cliente.

Cómo instalar el servidor Counter-Strike 1.6 en Linux

Cómo instalar el servidor Counter-Strike 1.6 en Linux

Esta guía completa le mostrará cómo configurar un servidor Counter-Strike 1.6 en Linux, optimizando el rendimiento y la seguridad para el mejor juego. Aprende los pasos más recientes aquí.

¿Puede la IA luchar con un número cada vez mayor de ataques de ransomware?

¿Puede la IA luchar con un número cada vez mayor de ataques de ransomware?

Los ataques de ransomware van en aumento, pero ¿puede la IA ayudar a lidiar con el último virus informático? ¿Es la IA la respuesta? Lea aquí, sepa que la IA es una bendición o una perdición

ReactOS: ¿Es este el futuro de Windows?

ReactOS: ¿Es este el futuro de Windows?

ReactOS, un sistema operativo de código abierto y gratuito, está aquí con la última versión. ¿Puede satisfacer las necesidades de los usuarios de Windows de hoy en día y acabar con Microsoft? Averigüemos más sobre este estilo antiguo, pero una experiencia de sistema operativo más nueva.

Manténgase conectado a través de la aplicación de escritorio WhatsApp 24 * 7

Manténgase conectado a través de la aplicación de escritorio WhatsApp 24 * 7

Whatsapp finalmente lanzó la aplicación de escritorio para usuarios de Mac y Windows. Ahora puede acceder a Whatsapp desde Windows o Mac fácilmente. Disponible para Windows 8+ y Mac OS 10.9+

¿Cómo puede la IA llevar la automatización de procesos al siguiente nivel?

¿Cómo puede la IA llevar la automatización de procesos al siguiente nivel?

Lea esto para saber cómo la Inteligencia Artificial se está volviendo popular entre las empresas de pequeña escala y cómo está aumentando las probabilidades de hacerlas crecer y dar ventaja a sus competidores.

La actualización complementaria de macOS Catalina 10.15.4 está causando más problemas que resolver

La actualización complementaria de macOS Catalina 10.15.4 está causando más problemas que resolver

Recientemente, Apple lanzó macOS Catalina 10.15.4, una actualización complementaria para solucionar problemas, pero parece que la actualización está causando más problemas que conducen al bloqueo de las máquinas Mac. Lee este artículo para obtener más información

13 Herramientas comerciales de extracción de datos de Big Data

13 Herramientas comerciales de extracción de datos de Big Data

13 Herramientas comerciales de extracción de datos de Big Data

¿Qué es un sistema de archivos de diario y cómo funciona?

¿Qué es un sistema de archivos de diario y cómo funciona?

Nuestra computadora almacena todos los datos de una manera organizada conocida como sistema de archivos de diario. Es un método eficiente que permite a la computadora buscar y mostrar archivos tan pronto como presiona buscar.