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.
Check your current Debian version:
# cat /etc/debian_version
10.10
Or:
# 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
Check that all packages are allowed to be updated:
# dpkg --audit
# dpkg --get-selections | grep 'hold$'
Replace the buster repository with bullseye in sources.list :
# vim nano /etc/apt/sources.list
### Debian 11 (bullseye)
deb http://deb.debian.org/debian bullseye main contrib non-free
deb-src http://deb.debian.org/debian bullseye main contrib non-free
deb http://deb.debian.org/debian-security/ bullseye-security main contrib non-free
deb-src http://deb.debian.org/debian-security/ bullseye-security main contrib non-free
deb http://deb.debian.org/debian bullseye-updates main contrib non-free
deb-src http://deb.debian.org/debian 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