I had two Raspberry Pi systems running Raspbian and they were failing to find updates for newer packages.
stable was upgraded too, moving from
bullseye the packages failed to get the newer ones.
Beware as this procedure might upgrade the system but might no render a bootable Raspberry Pi
A way to fix it is, to first, change references, if any, to the old codename version by running:
sed -i 's/buster/bullseye/g' /etc/apt/sources.list sed -i 's/buster/bullseye/g' /etc/apt/sources.list.d/raspi.list
And then, accept the updated new files for the new one:
apt-get update --allow-releaseinfo-change
Finally, we can perform the upgrade by first, installing some dependencies that will be required:
apt update apt install libgcc-8-dev gcc-8-base apt full-upgrade
With this, we get the new repository metadata, install the new required dependencies and perform the upgrade itself.