Running apt update on a server one morning gave us this:
E: Repository 'https://ppa.setup-php.com/ondrej/php/ubuntu jammy InRelease'
changed its 'Label' value from 'PPA for PHP' to 'PPA for PHP (deprecated)'
N: This must be accepted explicitly before updates for this repository can be
applied. See apt-secure(8) manpage for details.
Do you want to accept these changes and continue updating from this repository? [y/N]
Answering y makes the update go through. But the message signals that something upstream is changing, so it's worth understanding.
Why apt asks
apt treats changes to a repository's release metadata (Label, Origin, Suite, Codename) as suspicious because a hijacked mirror could change them. It refuses to continue until a human accepts the change. Here, the cause is harmless: the maintainer relabeled the repository.
In non-interactive runs (provisioning scripts, deploy hooks, cron), nobody can answer the prompt, so apt update fails. apt-get update --allow-releaseinfo-change gets past the error, but only silences it. It does not change where your packages come from.
What the new label says
Reports on several forums (Nextcloud, HestiaCP, Mail-in-a-Box) show the same change on the Ondřej Surý PHP PPA, with the label reading "Use packages.sury.org/php instead". The PPA appears to be moving to packages.sury.org/php, the repository already used for Debian. We found no official announcement or timeline, so treat this as a strong hint rather than a confirmed schedule.
What we found on our server
Our staging worker runs Ubuntu 22.04 (jammy) and was provisioned by Laravel Forge. Listing the apt sources showed two entries for the same PPA:
| File | Source |
|---|---|
ondrej-php.list |
ppa.setup-php.com/ondrej/php, a mirror, with signed-by=/usr/share/keyrings/ondrej-php.gpg |
ondrej-ubuntu-php-jammy.list |
ppa.launchpadcontent.net/ondrej/php, the standard add-apt-repository ppa:ondrej/php entry |
The mirror entry raised the Label error. apt-cache policy showed that both repositories served identical PHP builds:
$ apt-cache policy php8.5-cli
php8.5-cli:
Installed: 8.5.13-2+ubuntu22.04.1+deb.sury.org+1
Candidate: 8.5.13-2+ubuntu22.04.1+deb.sury.org+1
Version table:
*** 8.5.13-2+ubuntu22.04.1+deb.sury.org+1 500
500 https://ppa.setup-php.com/ondrej/php/ubuntu jammy/main amd64 Packages
500 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy/main amd64 Packages
Same version, two sources. Removing either one changes nothing about what is installed.
What we did
We removed the deprecated mirror entry and kept the Launchpad one:
sudo mv /etc/apt/sources.list.d/ondrej-php.list ~/ondrej-php.list.bak
sudo apt update
apt-cache policy php8.5-cli php8.4-cli
Moving the file to a backup instead of deleting it keeps the change easy to undo. After this, policy should list only the Launchpad source with the same candidate versions.
Caveats
- Provisioning tools may re-add the entry. If a tool like Forge created the mirror entry, it might recreate it the next time it installs or updates PHP. Check after your next PHP action.
- This is a stopgap. If the PPA is moving to
packages.sury.org/php, the Launchpad entry will eventually go stale too. Watch for a similar Label message on it. The real fix is migrating to the sury.org repository, following the maintainer's instructions. - Official docs lag. The PHP downloads page for Ubuntu still tells you to run
add-apt-repository ppa:ondrej/php. It also notes that these are third-party builds with patches the PHP project doesn't control. That's worth knowing regardless of which source you use. - Check every server. Run
grep -r "" /etc/apt/sources.list.d/on each one. Duplicates like this are easy to miss.
Takeaways
- A Label-change prompt from apt is a prompt to investigate, not just to press
y. --allow-releaseinfo-changesilences the error and migrates nothing.- Audit your apt sources for duplicates. We had the same PPA twice.
- Use
apt-cache policy <package>to see which repository your packages really come from.
If this post was enjoyable or useful for you, please share it! If you have comments, questions, or feedback, you can email my personal email. To get new posts, subscribe use the RSS feed.