OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
omarchy-core high common DISPUTE

Fix unknown-trust signatures on packages from the omarchy repository

omarchyarch
CORRECTED An auditor found the fix wrong or incomplete and rewrote it.
AUDIT NOTE

The fingerprint 40DFB630FF42BCFFB047046CF0134EE680CAC571 and keyserver keys.openpgp.org are verified exactly (bin/omarchy-update-keyring and manual/48-security.md). The clock-first advice is good. Three problems. (1) It misses the canonical one-command fix: omarchy-update-keyring exists and does precisely this recv-keys/lsign-key/install-omarchy-keyring dance. (2) sudo pacman -Sy then sudo pacman -S ... then sudo pacman -Syyuu will be aborted by bin/omarchy-update-pacman-guard on the -Syyuu step. (3) sudo pacman -Syyuu --noconfirm is genuinely dangerous as written. The double-u enables downgrades and --noconfirm accepts every one of them silently. The rm -rf /etc/pacman.d/gnupg step is the standard Arch recovery but is presented with no warning that it destroys every locally-signed key on the machine.

The cause above was not rewritten and may still contain the error described. The fix below is the corrected version.
RISK

pacman -Syyuu can downgrade packages (-uu). That is intentional here to resync with the Omarchy mirror, but do not run it while a previous transaction is half-applied.

Symptom

Updating fails with pacman signature errors on packages from the [omarchy] repository, e.g.


error: omarchy-shell: signature from "Omarchy <...>" is unknown trust
:: File /var/cache/pacman/pkg/....pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).

or error: failed to synchronize all databases (invalid or corrupted database (PGP signature)).

Cause

Omarchy ships its own signed pacman repository. Its signing key (fingerprint 40DFB630FF42BCFFB047046CF0134EE680CAC571) must be in the local pacman keyring and locally signed. The key gets lost or goes stale after a clock skew, a restored snapshot, a manual /etc/pacman.d edit, or an archlinux-keyring that fell far behind.

Fix

Make sure the system clock is right first, because a wrong clock invalidates every signature:


timedatectl set-ntp true
timedatectl status

Then use Omarchy's own repair command, which imports and locally signs the key and installs the keyring package exactly the way the installer does:


omarchy-update-keyring

If that is unavailable, do it by hand. This is the same sequence upstream runs:


sudo pacman-key --init
sudo pacman-key --populate archlinux
sudo pacman-key --recv-keys 40DFB630FF42BCFFB047046CF0134EE680CAC571 --keyserver keys.openpgp.org
sudo pacman-key --lsign-key 40DFB630FF42BCFFB047046CF0134EE680CAC571
sudo pacman-key --list-keys 40DFB630FF42BCFFB047046CF0134EE680CAC571   # confirm it is there

Then refresh the keyring packages and finish the upgrade through Omarchy, which handles the guard and the ordering for you:


omarchy update

If you must drive pacman directly, use the documented bypass and do NOT pass --noconfirm to a downgrade-enabled upgrade, because -uu permits downgrades and you want to see them before they happen:


sudo env OMARCHY_ALLOW_DIRECT_PACMAN=1 pacman -Sy archlinux-keyring omarchy-keyring
sudo env OMARCHY_ALLOW_DIRECT_PACMAN=1 pacman -Syu

Only if the keyring database itself is corrupt, rebuild it from scratch:


# WARNING: this deletes every key and every local signature on this machine,
# including any keys you added yourself. You must re-import and re-lsign after.
sudo rm -rf /etc/pacman.d/gnupg
sudo pacman-key --init
sudo pacman-key --populate archlinux
sudo pacman-key --recv-keys 40DFB630FF42BCFFB047046CF0134EE680CAC571 --keyserver keys.openpgp.org
sudo pacman-key --lsign-key 40DFB630FF42BCFFB047046CF0134EE680CAC571

Then resume with omarchy update.

Verify

pacman-key --list-keys 40DFB630FF42BCFFB047046CF0134EE680CAC571 shows the key with a local signature, and sudo pacman -Syu completes with no PGP errors.

Sources

omarchy-keyring-signature-unknown-trust