APT refuses to update repositories when release metadata changes unexpectedly. Use --allow-releaseinfo-change flag or the apt command to accept these changes and resume updating.
This error occurs when a repository's release information changes, typically when a Debian or Ubuntu distribution is moved to a different status. For example, when Debian 11 Bullseye became the stable release, Debian 10 Buster was moved to "oldstable" status, causing its Suite value to change from "stable" to "oldstable". APT enforces this security check to ensure users are aware of important distribution changes before automatically updating.
The quickest solution is to run apt-get update with the --allow-releaseinfo-change flag:
sudo apt-get update --allow-releaseinfo-changeThis command explicitly accepts the changed repository metadata and proceeds with the update. Run it once, and subsequent apt-get update commands will work normally.
For a more interactive approach, use the apt command instead of apt-get:
sudo apt updateThe apt command will prompt you with "Do you want to accept these changes and continue updating from this repository? [y/N]". Type "y" and press Enter to accept the changes. This is the preferred method for interactive use in recent Ubuntu versions.
If you want to permanently accept all release information changes, add this line to your APT configuration:
sudo nano /etc/apt/apt.conf.d/99-allow-release-changesAdd the following content:
Acquire::AllowReleaseInfoChange::Suite "true";Save and exit (Ctrl+X, then Y, then Enter). This configuration allows suite changes without requiring the flag each time. Use with caution and only if you understand the implications.
After accepting the release changes, verify that package updates work correctly:
sudo apt-get update
sudo apt-get upgradeYou should no longer see the "This must be accepted explicitly" error. The upgrade command shows you what packages will be updated before proceeding.
For automated environments like Ansible or Docker, you may want to use apt-get update --allow-releaseinfo-change in your automation scripts. You can also use specialized flags like --allow-releaseinfo-change-suite to allow only Suite changes, or --allow-releaseinfo-change-field for specific fields. The AllowReleaseInfoChange configuration option was added to APT 1.8.2.3 and can default certain field changes to true on newer systems. This is a security feature designed to notify administrators of distribution changes; ignoring it may result in unintended upgrades to different distribution versions.
E: Cannot set to hold: package 'package-name' is not installed
How to fix "Cannot set to hold" error when package is not installed in APT
debconf: unable to initialize frontend: Dialog
How to fix "debconf: unable to initialize frontend: Dialog" in APT
E: Could not connect to proxy server
Could not connect to proxy server
dpkg: serious warning: files list file for package 'package-name' contains empty filename
How to fix "files list file contains empty filename" in APT
E: Package 'package:i386' has no installation candidate
How to fix "Package package:i386 has no installation candidate" in apt