Skip to main content

Debian Upgrade to Bullseye

Hongkong, TST

Check OS Version

cat /etc/os-release

PRETTY_NAME="Debian GNU/Linux 10 (buster)"

Find the right repositories

Check https://www.debian.org/mirror/list for the nearest mirror.

Upgrade the repository list

apt edit-sources

Comment out the existing entries by prepending a pound key and add the new URLs, mainly replacing buster with bullseye in this example:

# deb http://deb.debian.org/debian buster main contrib non-free
# deb http://deb.debian.org/debian buster-updates main contrib non-free
# deb http://security.debian.org/ buster/updates main contrib non-free

deb http://mirrors.linode.com/debian bullseye main
deb-src http://mirrors.linode.com/debian bullseye main

# bullseye-security
deb http://mirrors.linode.com/debian-security bullseye-security/updates main
deb-src http://mirrors.linode.com/debian-security bullseye-security/updates main

# bullseye-updates
deb http://mirrors.linode.com/debian bullseye-updates main
deb-src http://mirrors.linode.com/debian bullseye-updates main

Test if the sources.list Configuration

apt update

Upgrade the System

Now, only after you performed a full system backup, upgrade your system:

apt full-upgrade && \
echo FINE || \
echo FAIL

Check OS Version

cat /etc/os-release

PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"

Hash Mismatch

E: Failed to fetch http://mirrors.linode.com/debian/dists/bullseye/main/i18n/by-hash/SHA256/a10a6afaed08d5920ca1f25470447ebe309d6ec6e1dccd7984dbf80f3794e9e5  Hash Sum mismatch
Hashes of expected file:
- Filesize:6241447 [weak]
- SHA256:a10a6afaed08d5920ca1f25470447ebe309d6ec6e1dccd7984dbf80f3794e9e5
- MD5Sum:defe22d6705e06848f94f8bdc44e6b31 [weak]
Hashes of received file:
- SHA256:cd403ad869e02ce4b0362a943eb3f23f2ad8c23568369e1f0398aec3367d86a2
- MD5Sum:a3ee386d51ec0bc4461ddc15a60ea2d6 [weak]
- Filesize:6241447 [weak]
Last modification reported: Sat, 09 Oct 2021 09:17:24 +0000

I started getting error messages when trying to update my system. This could be solved by:

rm -rf /var/lib/apt/lists/* && apt update
apt upgrade

If deleting /var/lib/apt/lists/* does not work - (esp. if you're behind a proxy), fix "Hash Sum Mismatch" by creating a file /etc/apt/apt.conf.d/99fixbadproxy:

Acquire::http::Pipeline-Depth 0;
Acquire::http::No-Cache true;
Acquire::BrokenProxy true;

And run:

rm  /var/lib/apt/lists/*
rm /var/lib/apt/lists/partial/*
apt-get update

See Github