Did you land here from changed its 'Label' value? Short version: ppa:ondrej/php is deprecated. Ondřej Surý ships a package that moves you over:
apt-get install debsuryorg-repository-php
apt-get update
apt-get upgrade --allow-downgrades
add-apt-repository --remove ppa:ondrej/phpInstall it while the PPA is still configured, because that is where the package lives. The --allow-downgrades is not a typo, and the rest of this post is mostly about why.
On Ubuntu 20.04, hold off on that last line until you have read the next section.
Which releases this works on #
I probed both repositories for every codename:
| Distribution | packages.sury.org | the old PPA |
|---|---|---|
| Debian 11 bullseye | yes | no |
| Debian 12 bookworm | yes | no |
| Debian 13 trixie | yes | no |
| Ubuntu 20.04 focal | no | yes |
| Ubuntu 22.04 jammy | yes | yes |
| Ubuntu 24.04 noble | yes | yes |
| Ubuntu 26.04 resolute | yes | yes |
Debian is the part with no gaps, which makes sense: deb.sury.org started as Debian packaging and the PPA was the Ubuntu branch of it.
Focal is the gap. The PPA still carries 20.04 and packages.sury.org does not, so removing the PPA there takes away the only PHP source on the machine and gives nothing back. Check before you remove anything:
curl -fsI "https://packages.sury.org/php/dists/$(. /etc/os-release; echo "$VERSION_CODENAME")/InRelease"Neither side carries the interim Ubuntu releases. It is LTS only, plus 26.04, which is already there.
What changed #
The Release file on the PPA dates the switch precisely:
Origin: LP-PPA-ondrej-php
Label: PPA for PHP (deprecated)
Date: Fri, 20 Nov 2026 17:59:38 UTCThat is 18:59 CET on 20 November. apt treats a changed Label as something a human should look at, so it stops. I found out the next morning, when an Ansible run gave up after five tries:
Repository '...ondrej/php/ubuntu noble InRelease' changed its 'Label' value
from 'PPA for PHP' to 'PPA for PHP (deprecated)'Everything that needs a successful apt-get update stops there: the playbook, and the apt-daily timer behind unattended-upgrades. A manual apt-get upgrade still runs, on package lists that are standing still. The server looks fine and silently stops receiving anything new, kernel included. apt-get update --allow-releaseinfo-change-label clears the error and leaves you on a repository that is being wound down, which is useful for getting a server moving and not much else.
Two of my seven servers were affected. Finding them:
grep -rlE 'ondrej|sury' /etc/apt/sources.list /etc/apt/sources.list.d/The downgrade that isn’t one #
This is the part worth slowing down for. The version suffix changes from +ubuntu24.04.1+deb.sury.org+1 to +debsuryorg24.04.1+1, and dpkg compares revisions character by character, where debsuryorg sorts before ubuntu. The new builds are newer and their version strings are lower. Ondřej says as much in the migration snippet in Codeberg issue #73.
Sometimes the Debian revision saves you. For php8.3-cli on noble today:
ppa: 8.3.37-2+ubuntu24.04.1+deb.sury.org+1
sury: 8.3.37-3+debsuryorg24.04.1+1-3 beats -2, so that one upgrades without any help. I pulled both package indexes for noble to see how far that holds. Of the 1324 packages the PPA carries, 941 have a higher Debian revision on sury and move across on their own. For 134 the revision is the same or lower, so apt sees a downgrade and leaves them alone:
php-geoip ppa: 1.1.1+repack1-7+ubuntu24.04.1+deb.sury.org+1
sury: 1.1.1+repack1-7+0~20260621.33+ubuntu24.04~1.gbp7bc732Ten of those carry a php8.x name, all of them extensions: solr, protobuf, phalcon5, openswoole. The runtime is not at risk, the long tail is. Remove the PPA without dealing with this and those packages sit on a build from a repository that no longer exists, getting no updates, while nothing anywhere reports an error.
That is what debsuryorg-repository-php is for. It depends on the keyring, writes the apt sources, and ships an apt preferences file that outranks the old origin, so the “downgrades” go through. If you prefer to do it by hand, Ondřej’s own recipe in that issue is a pin:
Package: *
Pin: origin packages.sury.org
Pin-Priority: 1001in /etc/apt/preferences.d/sury-migrate, then apt upgrade --allow-downgrades, then delete the file again.
Either way, check afterwards what is still sitting on the old build:
apt list --installed 2>/dev/null | grep 'deb\.sury\.org'Checking the key #
The official route installs a keyring package, and the README does it with dpkg -i straight from a download, so the only thing you are trusting is TLS to packages.sury.org. Unpacking it first costs one command and lets you look at what you are about to trust:
d=$(mktemp -d)
curl -fsSL -o "$d/keyring.deb" https://packages.sury.org/debsuryorg-archive-keyring.deb
dpkg-deb -x "$d/keyring.deb" "$d/x"
gpg --show-keys --with-subkey-fingerprints "$d"/x/usr/share/keyrings/debsuryorg-archive-keyring.gpgThe fingerprint:
15058500A0235D97F5D10063B188E2B695BD4743The same one comes out of the signature on the repository’s own Release file, which tells you the keyring and the repository agree with each other. That is one server vouching for itself. The key is also on keys.openpgp.org, which is separate infrastructure, and that is the check worth doing:
curl -fsS "https://keys.openpgp.org/vks/v1/by-fingerprint/15058500A0235D97F5D10063B188E2B695BD4743"You are also reading this fingerprint in a blog post, which is the weakest of the three.
Doing it by hand #
If you would rather write the source yourself, take the old one out first so apt never reads both:
rm -f /etc/apt/sources.list.d/ondrej-ubuntu-php-noble.sources
ls /etc/apt/trusted.gpg.d /etc/apt/keyrings | grep -i ondrejThat file name is Ubuntu 24.04, where add-apt-repository writes deb822; on jammy and older it is ondrej-ubuntu-php-<codename>.list. The PPA key is a separate file and stays behind on its own, hence the second line.
Then the keyring and the source. The redirect runs as your own user, so sudo echo does not get you there:
dpkg -i "$d/keyring.deb"
sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/debsuryorg-archive-keyring.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/sury-php.list'
apt-get updateI called the file sury-php.list instead of the README’s php.list, which is generic enough to collide with something that is already there. Doing it this way means the pin from the previous section is yours to handle.
What I ran #
One script per server: back up /etc/apt/sources.list.d/, swap the source, run apt-get update, and copy the backup back if the update returned an error or mentioned sury in a warning. The normal update round and the reboot came after. Run the commands by hand and that backup is your only rollback.
I did one server first and read three things before starting on the second:
apt-cache policy php8.3-cli
apt-get -s dist-upgradeWhich version is the candidate, which repository it comes from, what the upgrade is about to do. Both servers came through it, though a dist-upgrade that swaps in another build of the same PHP version restarts php8.3-fpm, which is a short outage on a production web server rather than a no-op.
One thing I have not covered: whether the old origin is still in Unattended-Upgrade::Allowed-Origins, or whether anything pins it in /etc/apt/preferences.d/. Its origin was LP-PPA-ondrej-php and the new one is not that, so if it is whitelisted anywhere, PHP security updates stop arriving without a single thing failing. Same shape as the problem this post opens with.
Why Ubuntu’s version number never moves #
Worth understanding before you decide which repository a server should use, because the version number tells you the opposite of what you would guess.
Ubuntu freezes the upstream version for the life of a release and backports security fixes into it. Noble still ships 8.3.6, and only the tail of the version moves: 0ubuntu0.24.04.12 on 19 October, .13 two days later. Sury does the other thing and follows upstream, so you get 8.3.35, 8.3.36, 8.3.37 as they appear. Ondřej is quick about it: 8.3.35 landed the day after upstream, 8.3.36 the same day, 8.3.37 the day after.
Fast against upstream is not the same as first with a fix. For CVE-2026-109618 and CVE-2026-109619:
Ubuntu USN-8948-1 21 Oct 2026 13:56 UTC 8.3.6-0ubuntu0.24.04.13
sury 8.3.36 21 Oct 2026 18:00 UTCUbuntu was four hours ahead, with a version number that barely changed. Run php -v on both and the Ubuntu box looks a year and a half behind while it is patched to the same day.
That is one pair of CVEs and not a trend, so do not read it as “Ubuntu is faster” either. What it does mean is that the reason to run sury is a newer PHP than your release carries, not an expectation of earlier fixes. If 8.3 is all you need on 24.04, Ubuntu’s own packages are doing the work, and backporting is what keeps the behaviour stable for the life of the release.