[HowTo] Solve Keyring Related Issues in Manjaro

Wiki Page:
https://wiki.manjaro.org/index.php/Pacman_troubleshooting#Errors_about_Keys

Manjaro and Arch users have a security keyring on their machine that allows them to safely download packages from the Manjaro and Arch repositories without those packages getting tampered with by a man-in-the-middle-attack.

Sometimes if a user doesn’t update their system for a long time, this keyring might expire. The keyring can also get corrupted for some reason.

To solve basic keyring issues do the following:

Resynchronise with the Manjaro repository servers to ensure that everything is up to date - by entering the command:

sudo pacman -Syy

Refresh and update the signature keys by entering the command:

sudo pacman-key --refresh-keys

Reload the signature keys by entering the command:

sudo pacman-key --populate archlinux manjaro

The three commands above should solve most (basic) keyring issues.

If they don’t, then you can also try more drastic measures.
Warning: The following commands only work if your system time is set correctly!

Remove all keys

sudo rm -rf /etc/pacman.d/gnupg

Reinitialize files & folders for keys

sudo pacman-key --init

Repopulate keys

sudo pacman-key --populate archlinux manjaro

Reinstall latest keyrings

sudo pacman -Sy gnupg archlinux-keyring manjaro-keyring

Refresh the signature keys

sudo pacman-key --refresh-keys

Clear out the software packages downloaded during aborted installations (optional):

sudo pacman -Sc

Warning: The above command clears the pacman cache completely, and you will not be able to downgrade to a previous version of a package until you’ve updated the packages at least two times.

Finally, try updating your system to see if the errors were resolved.

sudo pacman -Syu

Imported & adapted from @Heart-Of-A-Lion’s and @arvind’s Posts on the archived forum.


Creating this as a wiki post so that experts can make the necessary changes :wink:

3 Likes

A wiki page exists…

https://wiki.manjaro.org/index.php/Pacman_troubleshooting#Errors_about_Keys

1 Like

Okay then, feel free to delete the entire post if necessary. :slightly_smiling_face:
[I just saw the post at archived forum a few days ago, wasn’t ware of the wiki page, very sorry for that]

Don’t be sorry.

I think the more places something, especially something as common as this, can be found, thee better.

1 Like