Score:12

After upgrade from Debian 10 Buster to Debian 11 Bullseye security updates 404 not found

in flag

Doing recommended upgrade path, TL;DR:

Backup data, then

apt update
apt upgrade
apt dist-upgrade
reboot

Also disable all non main stream packages if any.

Then preparing APT for new distribution:

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

The first command shows error:

apt update
...
Err:6 http://security.debian.org/debian-security bullseye/updates Release
  404  Not Found
Reading package lists... Done
E: The repository 'http://security.debian.org/debian-security bullseye/updates Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Score:18
in flag

This is regarding change in Debian 11 repository structure. RTFM requires time, so bump answer here:

For Debian bullseye, the security suite is now named bullseye-security instead of codename/updates and users should adapt their APT source-list files accordingly when upgrading.

Thus execute one more command:

sed -i 's/bullseye\/updates/bullseye-security/g' /etc/apt/sources.list

Now apt update works great again, and you can continue with upgrade:

sudo apt update
sudo apt upgrade --without-new-pkgs
sudo apt full-upgrade
reboot

Check if system is upgraded:

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

After successful reboot, you can remove old kernel:

sudo apt purge linux-image-4.19*

Also review log files, for error messages of conflicting configurations or other issues.

Issue list is here: https://www.debian.org/releases/bullseye/amd64/release-notes/ch-information.html

in flag
I like the new Debian repository structure, much less confusing than buster/updates and buster-updates imho.
cn flag
I'd like to think they would just make a simple symlink on the server side and a package to update the apt sources list on the machine side to prevent these kinds of issues...
sv flag
-1 because answer is fragile. If user has made any manual changes to sources.list, it might not work, and user not given the next thing to try. c.f. [this answer](https://serverfault.com/a/1100638/288263) which gives what I consider a more robust answer.
Score:1
es flag

If you followed the various Debian update tutorials out there, chances are you ended up with an incorrect /etc/apt/source.list

As most "fixes" are listed sed command patches, they may not work if your original source.list content isn't a perfect match.

In that case, just edit source.list manually, the new bullseye security lines should read like

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

or alternatively if you do not need source and want contrib, it could be just

deb http://security.debian.org/debian-security/ bullseye-security main contrib
sv flag
Informative, robust and also correct answer.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.