​How to Upgrade Debian 10 to Debian 11

Estimated reading: 3 minutes 1178 views

Introduction

Debian is one of the most stable Linux distributions, widely used on VPS, personal servers, and enterprise environments. Debian 11 (Bullseye) offers significant improvements in security, performance, and software updates compared to Debian 10 (Buster).

This guide will walk you through a safe upgrade from Debian 10 to Debian 11, step by step, including instructions for systems where Debian 10 is outdated and direct repositories may no longer be available.


1. Prerequisites

  • You must run commands as root or a user with sudo privileges.

  • Backup your data: If running Debian on a VPS, take a full system snapshot.

  • Note any custom configurations you may have.


2. Update currently installed packages on Debian 10

sudo apt update
sudo apt upgrade -y
sudo apt full-upgrade -y
sudo apt autoremove -y
  • Check for held packages:

sudo apt-mark showhold
  • If necessary, unhold them:

sudo apt-mark unhold package_name

3. If Debian 10 is outdated – use archive.debian.org

  1. Backup your sources.list before editing:

sudo apt-mark unhold package_name
  1. Edit sources.list to point to the archive repository:

sudo nano /etc/apt/sources.list

Replace the content with:

deb http://archive.debian.org/debian buster main contrib non-free
deb http://archive.debian.org/debian-security buster/updates main contrib non-free
  1. Disable the repository expiration check:

sudo nano /etc/apt/apt.conf.d/99disable-check-valid-until

Add the following line:

Acquire::Check-Valid-Until "false";
  1. Update and upgrade your Debian 10 system:

sudo apt update
sudo apt upgrade -y
sudo apt autoremove -y

This fixes 404 errors and prepares your system for the upgrade to Debian 11.


4. Upgrade Debian 10 → 11

4.1 Configure sources.list for Bullseye

Open /etc/apt/sources.list and replace buster with bullseye and buster/updates with bullseye-security.

Example:

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

Alternatively, use sed commands:

sudo sed -i 's/buster/bullseye/g' /etc/apt/sources.list
sudo sed -i 's/buster/bullseye/g' /etc/apt/sources.list.d/*.list
sudo sed -i 's#/debian-security bullseye/updates# bullseye-security#g' /etc/apt/sources.list

4.2 Update the package index

sudo apt update
  • If there are errors from third-party repositories, fix or disable them.


4.3 Upgrade existing packages

sudo apt update
  • You will be prompted whether to:

    • Restart services automatically

    • Keep current configuration files or install the maintainer’s version

  • If you haven’t modified files, it’s safe to install the maintainer’s version (Y).


4.4 Full system upgrade

sudo apt full-upgrade
  • This installs new packages, removes obsolete ones, and resolves dependencies between releases.


4.5 Clean up unnecessary packages

sudo apt autoremove

4.6 Reboot your system

sudo systemctl reboot

5. Verify the Debian version

lsb_release -a

Expected output:

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

Conclusion

  • Upgrading from Debian 10 to Debian 11 is straightforward if you follow the steps carefully.

  • Backup your system first to avoid data loss.

  • Use archive.debian.org if Debian 10 repositories are no longer accessible.

  • After upgrading, your system will run the latest Debian 11 kernel and packages, with improved security and performance.

  • Check the Debian 11 Release Notes for any known issues during the upgrade.

Share this Doc

​How to Upgrade Debian 10 to Debian 11

Or copy link

CONTENTS