Fix 'signature is unknown trust' from an out-of-date keyring
Symptom and cause hold. The tzdata line is quoted verbatim from basecamp/omarchy issue 4197 (Omarchy 3.3.3, closed), read in full with comments: dhh suggested omarchy-refresh-pacman and clearing the cache, and the reporter resolved it with pacman-key --init, --populate archlinux, pacman -Sy archlinux-keyring, then the update, so the issue supports the record. The Arch wiki Pacman/Package signing page, fetched as raw wikitext today, still gives exactly pacman -Sy --needed archlinux-keyring && pacman -Su under Upgrade system regularly and states it is not considered a partial upgrade, lists the three causes of unknown trust the record's cause describes, and adds one thing the record predates: since pacman 7.1 (this machine has 7.1.0) pacman refreshes an expired known key from WKD by itself, so the expired-key case is now mostly self-healing. What is wrong is the Omarchy 4 side. Read on this machine, /usr/bin/omarchy-update-pacman-guard aborts any pacman command line carrying both S and u unless OMARCHY_ALLOW_DIRECT_PACMAN=1 or OMARCHY_UPDATE_PACMAN=1 is set, so the sudo pacman -Su half of steps 1 to 3 and the sudo pacman -Syu in verify are refused on Omarchy 4. pacman -Sy --needed archlinux-keyring alone passes, because it has no u. The right Omarchy form is omarchy update, which already does the wiki's sequence: /usr/share/omarchy/bin/omarchy-update (omarchy 4.0.2-1, identical on quattro) runs omarchy-update-keyring immediately before omarchy-update-system-pkgs, and that helper re-imports and lsigns 40DFB630FF42BCFFB047046CF0134EE680CAC571 from keys.openpgp.org only if omarchy-keyring or the key is missing, then always runs pacman -Sy --noconfirm archlinux-keyring, and system-pkgs runs pacman -Syu with OMARCHY_UPDATE_PACMAN=1. /var/log/pacman.log on this machine shows that reinstall on 2026-09-06 during an update. The record presents omarchy-update-keyring as a standalone fix, which leaves the machine after a bare -Sy with no upgrade, the state the script's own comment says is only acceptable because the full upgrade follows. The key is present here (pacman-key --list-keys shows Omarchy <pkgs@omarchy.org>, ed25519, 2025-08-28, full trust) and omarchy-keyring 20251027-1 ships /usr/share/pacman/keyrings/omarchy.gpg, omarchy-trusted and omarchy-revoked, so after wiping /etc/pacman.d/gnupg a bare pacman-key --populate restores the Omarchy key from disk, which the danger text says needs a manual re-import and re-lsign. archlinux-keyring-wkd-sync.timer exists here, owned by archlinux-keyring 20260727-1, static, active (waiting), OnCalendar=weekly, next trigger 2026-09-12, wired by the package's own /usr/lib/systemd/system/timers.target.wants/ symlink and with no [Install] section, so the record's systemctl enable --now is unnecessary and, being a static unit, is not something systemctl enable is meant for. The wiki also scopes the timer to marginal trust, not to a missing new packager key, which the record slightly overstates. The record's master raw URL for omarchy-update-keyring returns 200 and matches quattro byte for byte, so that source is valid. Not exercised: no machine here has a stale keyring, so the recovery sequence was verified against the wiki and the scripts, not run.
Do NOT "fix" this by setting SigLevel = Never or TrustAll in /etc/pacman.conf. That disables signature verification system-wide and lets a hostile or corrupted mirror install anything. Deleting /etc/pacman.d/gnupg destroys every locally signed key. Keys that came from a keyring package (archlinux-keyring, and on Omarchy 4 omarchy-keyring) come back with pacman-key --populate, but keys you imported and lsigned by hand (Chaotic-AUR, CachyOS, a private repo) have to be re-imported and re-lsigned. On Omarchy 4 the next omarchy update re-imports the Omarchy key by itself if it is missing.
Symptom
Every package in an update fails verification:
error: tzdata: signature from "Andreas Radke <andyrtr@archlinux.org>" is unknown trust
:: File /var/cache/pacman/pkg/tzdata-2025c-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))
Typically on a machine that has not been updated for weeks or months, or on a fresh install from an older ISO.
Cause
The local pacman keyring (/etc/pacman.d/gnupg) predates the packager keys that signed the new packages, or a trusted key expired. archlinux-keyring is itself a package, so a long-stale system cannot verify the very keyring update it needs.
Fix
**Plain Arch / EndeavourOS / CachyOS**
Step 1. Sync the database and upgrade only the keyring, then upgrade everything. The Arch wiki gives this exact form and states it is not a partial upgrade, because the full upgrade follows immediately:
sudo pacman -Sy --needed archlinux-keyring && sudo pacman -Su
Step 2. If that still fails, clear the half-downloaded and unverifiable packages from the cache and retry:
sudo rm -f /var/cache/pacman/pkg/*.part
sudo pacman -Sc
sudo pacman -Sy --needed archlinux-keyring && sudo pacman -Su
Step 3. Last resort, reset the keyring and repopulate it from the installed keyring packages:
sudo rm -rf /etc/pacman.d/gnupg
sudo pacman-key --init
sudo pacman-key --populate
sudo pacman -Sy --needed archlinux-keyring && sudo pacman -Su
**Omarchy 4**
Do not run pacman -Su or pacman -Syu directly. Both carry -S and -u, so /usr/bin/omarchy-update-pacman-guard aborts the transaction. omarchy update already does the wiki's sequence itself: it runs omarchy-update-keyring right before the system upgrade, and that helper re-imports and locally signs Omarchy's packaging key 40DFB630FF42BCFFB047046CF0134EE680CAC571 from keys.openpgp.org if it is missing, installs omarchy-keyring if it is missing, then always reinstalls archlinux-keyring with pacman -Sy --noconfirm archlinux-keyring and goes straight into the full upgrade:
omarchy update
If the update still fails on signatures, clear the cache first and rerun it:
sudo rm -f /var/cache/pacman/pkg/*.part
sudo pacman -Sc
omarchy update
Last resort, reset the keyring. omarchy-keyring ships /usr/share/pacman/keyrings/omarchy.gpg, so a bare pacman-key --populate restores the Omarchy key alongside the Arch keys with no keyserver round trip, and omarchy update then refreshes archlinux-keyring and upgrades:
sudo rm -rf /etc/pacman.d/gnupg
sudo pacman-key --init
sudo pacman-key --populate
omarchy update
Do not run omarchy-update-keyring on its own as the fix. It ends with a bare pacman -Sy and relies on the full upgrade that omarchy update runs right after it. Stopped there, the machine has synced databases and un-upgraded packages, which is the partial-upgrade state.
Prevention: archlinux-keyring-wkd-sync.timer refreshes the signatures on already trusted keys weekly, which prevents the related "marginal trust" failure. The archlinux-keyring package wires it in itself through /usr/lib/systemd/system/timers.target.wants/, the unit is static, and it needs no systemctl enable. Check that it is waiting:
systemctl list-timers --all | grep keyring
Verify
sudo pacman -Syu downloads and installs without any "unknown trust" or "invalid or corrupted package (PGP signature)" lines. sudo pacman-key --list-keys | head shows a populated keyring.
Sources
- https://wiki.archlinux.org/title/Pacman/Package_signing
- https://wiki.archlinux.org/title/Pacman
- https://github.com/basecamp/omarchy/issues/4197
- https://raw.githubusercontent.com/basecamp/omarchy/master/bin/omarchy-update-keyring
- https://github.com/basecamp/omarchy/blob/quattro/bin/omarchy-update-keyring
- https://github.com/basecamp/omarchy/blob/quattro/bin/omarchy-update-pacman-guard
- https://github.com/basecamp/omarchy/blob/quattro/bin/omarchy-refresh-pacman
- https://archlinux.org/packages/core/any/archlinux-keyring/json/