Pacman “signature is unknown trust” error

Are you getting errors like the below while trying to update your Arch-based system using Pacman?


error: package_name: signature from "Person Name " is unknown trust
:: File /var/cache/pacman/pkg/package-x86_64.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).

You’re system is probably really, really out of date. Below is what I did to fix it:


# blow away all Pacman gpg keys
root@manjaro # rm -r /etc/pacman.d/gnupg
# re-init Pacman gpg keys
root@manjaro # pacman-key --init
# re-populate arch (and manjaro, if needed) keys
root@manjaro # pacman-key --populate archlinux manjaro
# re-download arch (and manjaro, if needed) keyrings
root@manjaro # pacman -Syy archlinux-keyring manjaro-keyring
# re-acquire any additional / non-official keys you had
root@manjaro # pacman-key --add /path/to/downloaded/keyfile
# upgrade system
root@manjaro # pacman -Syu

In short, blow away current GPG keys, re-initialise the keyring, re-acquire the official Arch (and Manjaro) keys and update to the latest keyring.

If you’re still getting the error, then you’re possibly being MITM’d and likely have other problems to worry about.