Yarn and Sury APT keys issues

Hi everyone !

You might have issues with your system updates :wrench:. Here are the usual error messages:

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://packages.sury.org/php bookworm InRelease: The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key
W: GPG error: https://dl.yarnpkg.com/debian stable InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 62D54FD4003F6525
E: The repository ‘https://dl.yarnpkg.com/debian stable InRelease’ is not signed.

Don’t panic ! There is an easy fix. You’ll just need a shell access (e.g via `ssh`) to your server.

Once you are logged in as admin, run:

sudo rm /etc/apt/trusted.gpg.d/{yarn,extra_php_version}.gpg
sudo yunohost tools regen-conf apt

And that’s all ! :tada:

To check that the fix is working, re-run the search of updates:

sudo apt update

We’ll try to find an automatic fix for the future but that’s not the easiest thing.

17 Likes