You've asked a good question - one that's a potential concern to all RPi users. I'm still working through this - I may not have a complete answer now, but I'll post what I've learned now, and update when I gather "the rest of the story". Feedback, corrections and comments are welcomed.
Some clarification on semantics is always useful when discussing Debian's Advanced Packaging Tool (APT):
- APT is a generic term referring to the collection of tools used for package management.
apt-get is a 'command-line tool for handling packages, and may be considered the user's "back-end"'
apt is 'a high-level commandline interface for the package management system. It is intended as an end user interface and enables some options better suited for interactive usage by default compared to more specialized APT tools like apt-get(8) and apt-cache(8)'
This was not an "error" per se
It's simply information - some feedback from
apt letting you know what happened as it attempted the
update you requested.
apt-get update ran successfully to completion, but it found some things that you should know. It declined to
update because it found discrepancies, and it wants you to acknowledge the discrepancy before it performs the update.
apt-get not perform the normal
A lot of details behind this, but I'll summarize it as follows:
RPi OS is a derivative of Debian
Debian officially released
bullseye on Aug 14, 2021
As is typical, the official release of RPi's new version lags the release date of Debian by 2-4 months. This because some aspects of the RPi release are dependent upon having a stable Debian release.
This "gap" between the Debian release and the RPi release creates discrepancies in the labels used to identify and segregate branches of the repositories. In particular, the
stable label is now assigned to the newer, leading Debian
bullseye version. Consequently, the
buster branch must surrender the
stable label; the RPi and/or Debian maintainers have decided to change the label to
apt doesn't know of this change. It wants to follow
stable is now in
bullseye - not in
buster. Rather than panic, it simply throws the decision over to the user... "what do you want to do, boss?"
What should I do?
You have many options - here are a few to consider:
You can ignore it, and forego updates for a while. This isn't as bad as it sounds... with RPi maintainers hard at work on the
bullseye release, there is very little time for changes to
buster. To learn when your last
upgrade was performed, run
less /var/log/apt/history.log. If it's been since Aug 14, you're likely not missing many updates.
You could go ahead and upgrade to a pre-release version of
bullseye using one of RonR's scripts.
You can continue following
buster. Debian releases are maintained for 3 years, and come under Long-Term-Support for an additional 2 years, so
buster will be around for a while. And of course you may also choose to follow
buster only until
bullseye is released for RPi.
Under this option, you will need to manipulate
apt-get to continue tracking
buster. One way to do this is to employ the option
man apt-get for further details. N.B. that this option brings some risk with it as it essentially bypasses
apt-secure. Reviewing the details in
man apt-get informs us that it's possible to reduce that risk somewhat by additionally specifying one of the
specialty options - in this case the
suite label as that is the label that has been changed in
$ sudo apt-get --allow-releaseinfo-change-suite update
You can try
apt instead of
apt-get. Some sources will state without reservation that using
apt instead of
apt-get will simply make this issue go away - i.e.:
$ sudo apt update
# as opposed to:
$ sudo apt-get update
I won't dispute that - all I can say is that on my systems (RPi OS Lite), I have not been able to verify this. I get no prompt from
sudo apt update asking me to approve anything. AIUI,
apt depends upon
/etc/apt/preferences.d to relieve the user from making decisions - but these files are absent on my system. Debian's man page for apt_preferences states:
Preferences are a strong power in the hands of a system administrator but they can become also their biggest nightmare if used without care! APT will not question the preferences, so wrong settings can lead to uninstallable packages or wrong decisions while upgrading packages. Even more problems will arise if multiple distribution releases are mixed without a good understanding of the following paragraphs.
That's enough information for me, thank you. But seriously, this may work beautifully for some - using
apt instead of
apt-get may work for you. It's certainly the easiest solution here.
I don't presently know of other specific options within
apt-get for doing this, but I'd have to guess there are as APT in general, and
apt-get in particular is, uh... "full-featured" if nothing else. I also don't know what RPi's MO is for retaining the
suite label beyond the official release date for RPi's version of
bullseye. I'll update if I learn of their plans.