Problem with gpg keys after 41 -> 42 upgrade

Just upgraded my Fedora workstatation from 41 to 42 using dnf system-upgrade..

Problem I am facing now is that any attempt to run dnf update results in error:

“Failed to import OpenPGP keys into temporary keyring: Parsing armored OpenPGP packet(s) failed”

Reduced the list of repo’s down to just the Fedora repos, but I still get the error.

dnf repolist
repo id repo name
fedora Fedora 42 - x86_64
fedora-cisco-openh264 Fedora 42 openh264 (From Cisco) - x86_64
updates Fedora 42 - x86_64 - Updates

Tried re-importing the fedora.gpg file (had to convert to ascii first to work with rpm --import ), that did not resolve the issue. Not sure what else to try to either get more detailed information or remove or reset problemantic keys.

Thanks in advance for any help on this issue.

Check the output:

grep -h -r -e gpgkey /etc/yum.repos.d | sort -u
rpmkeys --list

Outdated keys can be removed like this:

sudo rpmkeys --delete xxxxxxxx-xxxxxxxx

See also: libdnf5-plugin-expired-pgp-keys - Fedora Packages

Ok, rpmkeys --list gave me a list of about 100 keys. Set to work on removing the oldest ones with rpm -e and after about 50 things started to work. (earliest I could identify were from Fedora 8…but could have been several keys from several ancient repos that caused the glitch I guess).

That solved the issue. Thanks for your help!

2 Likes