GPG error: The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG

4
(1)

Error says:

# apt-get update GPG error: https://packages.sury.org/php buster InRelease: The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG

Full listing

$ sudo apt-get update
...
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 buster InRelease: The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key <deb@sury.org>
W: Failed to fetch https://packages.sury.org/php/dists/buster/InRelease The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key <deb@sury.org>
W: Some index files failed to download. They have been ignored, or old ones used instead.
 
$ apt-key list | grep -A 1 expired
Warning: apt-key output should not be parsed (stdout is not a terminal)
pub rsa3072 2019-03-18 [SC] [expired: 2021-03-17]
 1505 8500 A023 5D97 F5D1 0063 B188 E2B6 95BD 4743
uid [ expired] DEB.SURY.ORG Automatic Signing Key <deb@sury.org>

For treatment, you need to delete the old key and download a new one, and if it does not help, then view the local key store for the presence of a second DEB.SURY.ORG key and delete the one that is expired:

$ sudo rm -rf /etc/apt/trusted.gpg.d/sury.gpg
$ sudo apt-key del 95BD4743
$ sudo wget -O /etc/apt/trusted.gpg.d/sury.gpg https://packages.sury.org/php/apt.gpg

$ apt-key list | grep -A 5 sury
Warning: apt-key output should not be parsed (stdout is not a terminal)
/etc/apt/trusted.gpg.d/sury.gpg
-------------------------------
pub rsa3072 2019-03-18 [SC] [expires: 2024-02-16]
 1505 8500 A023 5D97 F5D1 0063 B188 E2B6 95BD 4743
uid [ unknown] DEB.SURY.ORG Automatic Signing Key <deb@sury.org>
sub rsa3072 2019-03-18 [E] [expires: 2024-02-16]
$ sudo apt-get update
$ sudo apt-get upgrade

Maybe successful update…

22

How useful was this post?

Click on a star to rate it!

Average rating 4 / 5. Vote count: 1

No votes so far! Be the first to rate this post.

Scroll to Top