How to Upgrade Debian 10 to Debian 11
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
-
Check for held packages:
-
If necessary, unhold them:
sudo apt-mark unhold package_name
3. If Debian 10 is outdated – use archive.debian.org
-
Backup your
sources.listbefore editing:
-
Edit
sources.listto point to the archive repository:
Replace the content with:
-
Disable the repository expiration check:
Add the following line:
-
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:
Alternatively, use sed commands:
4.2 Update the package index
-
If there are errors from third-party repositories, fix or disable them.
4.3 Upgrade existing packages
-
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
-
This installs new packages, removes obsolete ones, and resolves dependencies between releases.
4.5 Clean up unnecessary packages
4.6 Reboot your system
5. Verify the Debian version
lsb_release -a
Expected output:
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.