Try New Technology

Manjaro updates not possible due to keyring errors

by on Jul.09, 2023, under Linux, Techie

Many articles will point to the issue being caused by not updating for a while; I update daily if not weekly and this has happened to me twice even with recently updating a day or two previously. My system is Manjaro KDE. The solution I have come up with is pulled together from many forum posts and lots of testing to figure out what worked.

Below are examples of the error messages I saw while running sudo pacman -Syuu:

error: libadwaita: key "06687A1D9D4FAB08B50FD92B3B94A80E50A477C7" is unknown
:: Import PGP key 06687A1D9D4FAB08B50FD92B3B94A80E50A477C7? [Y/n]
:: File /var/cache/pacman/pkg/libadwaita-1:1.3.3-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n]
...
...
error: failed to commit transaction (invalid or corrupted package (PGP signature))
Errors occurred, no packages were upgraded.

While trying different fixes I had some of the below steps missing and was getting errors like the following, but once I did everything in order they cleared up:

==> ERROR: Trust database could not be updated.
error: command failed to execute correctly

  1. Terminal: kate /etc/pacman.conf
  2. Edit line 45, which should read SigLevel = Required DatabaseOptional to instead read SigLevel = Optional TrustAll
  3. Save
  4. Terminal: sudo rm -rf /etc/pacman.d/gnupg/*
  5. Terminal: sudo pacman-key --init
  6. Terminal: sudo pacman-key --populate
  7. Terminal: sudo pacman -Sy archlinux-keyrin
  8. Terminal: sudo pacman -Syyu
  9. Reboot
  10. Change Line 45 of /etc/pacman.conf back to the default value (shown in Step 2)

NOTE: I tried a lot of different things before coming up with these exact steps. There is always a chance that something I did in the middle, which isn’t listed in the above steps was also part of the resolution and was omitted think it just “didn’t work.” If I run into this problem again in the future I will update this if I find anything else is needed.

This allowed me to update an individual package as well as an entire OS update.


Comments are closed.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...