How Upgrade Debian 10 (Buster) to Debian 11 (Bullseye)? / Linux / Debian / How Upgrade Debian 10 (Buster) to Debian 11 (Bullseye)?

The new version of Debian 11, codenamed Bullseye, was released on 08/15/2021. In this article, we’ll show you how to upgrade from a previous version of Debian 10 (Buster) to Debian 11 release.

Major changes in Debian 11 Bullseye:

  • Linux kernel updated to version 5.10;
  • Updated basic server packages: Apache httpd 2.4.48, nginx 1.18, Dovecot 2.3.13, Exim 4.94, Postfix 3.5, MariaDB 10.5, PostgreSQL 13, Samba 4.13, OpenSSH 8.4, BIND 9.16;
  • Changed the format of lines in the /etc/apt/sources.list file. {dist}-updates lines renamed to {dist}-security.

Upgrading Debian 10 (Buster) to Debian 11 (Bullseye) from CLI

Check your current Debian version:

# cat /etc/debian_version



# lsb_release -a

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

Before upgrading your Debian, update all installed packages:

# apt apt update
# apt apt upgrade -y
# apt apt autoremove -y
# apt apt dist-upgrade -y

Find all packages that are not installed from the official Debian repositories:

# apt install apt-forktracer
# apt-forktracer | sort
These packages may have problems after upgrading to Debian 11. You may need to reinstall them.

Check that all packages are allowed to be updated:

# dpkg --audit
# dpkg --get-selections | grep 'hold$'
The command will return packages that are partially installed (Half-Installed), the configuration of which has failed (Failed-Config), and all packages with errors.

Replace the buster repository with bullseye in sources.list :

# vim nano /etc/apt/sources.list

### Debian 11 (bullseye)
deb bullseye main contrib non-free
deb-src bullseye main contrib non-free
deb bullseye-security main contrib non-free
deb-src bullseye-security main contrib non-free
deb bullseye-updates main contrib non-free
deb-src bullseye-updates main contrib non-free

If there are other repositories connected, change them too.

Make sure there is enough free disk space to download the packages. You can estimate the size of the updates as follows:

# apt -o APT::Get::Trivial-Only=true full-upgrade

New packages are downloaded into /var/cache/apt/archives, so there should be enough free space on the /var partition.

Update the package list for the new release:

# apt apt update

Perform a minimal update first:

# apt upgrade --without-new-pkgs

Then run a full release upgrade:

# apt apt dist-upgrade

Restart your computer:

# apt reboot

Delete unnecessary files:

# apt apt autoremove -y

Find the removed packages whose files are still on disk:

# dpkg -l | awk '/^rc/ { print $2 }'

To remove them, run:

# apt purge $(dpkg -l | awk '/^rc/ { print $2 }')

Check your OS version and make sure it has changed to Debian 11.0 Bullseye.

$ cat /etc/debian_version

/etc/debian_version - upgraded to debian 11


Leave a Reply

Your email address will not be published. Required fields are marked *