'Woah partner...': the Omarchy pacman guard aborts every direct pacman -Syu
Cause is exact. default/libalpm/hooks/00-omarchy-update-guard.hook is verbatim Operation = Upgrade / Type = Package / Target = * / Description = Checking Omarchy update entrypoint... / When = PreTransaction / Depends = omarchy / Exec = /usr/bin/omarchy-update-pacman-guard / AbortOnFail, which also explains the leading ":: Checking Omarchy update entrypoint..." line. bin/omarchy-update-pacman-guard reads /proc/$PPID/cmdline, requires BOTH a sync and a sysupgrade flag (so pacman -S foo really is unaffected), honours OMARCHY_UPDATE_PACMAN=1 and OMARCHY_ALLOW_DIRECT_PACMAN=1, and its message is reproduced word for word including the suggested sudo env OMARCHY_ALLOW_DIRECT_PACMAN=1 pacman -Syu. alpm-hooks(5) confirms the shadow trick verbatim: system dir is /usr/share/libalpm/hooks, custom dir defaults to /etc/pacman.d/hooks, and "Hooks may be overridden by placing a file with the same name in a higher priority hook directory. Hooks may be disabled by overriding them with a symlink to /dev/null." omarchy-migrate --pending exits 0 when pending, as claimed, and omarchy-hook post-update exists. The defect is the AUR-helper escape hatch, both lines of it. sudo env OMARCHY_ALLOW_DIRECT_PACMAN=1 yay -Syu tells the reader to run yay as root, which yay refuses/breaks on by design (it builds as an unprivileged user and warns against sudo). And dropping the sudo does not work either: yay and paru shell out to their own sudo pacman -Syu, and sudo's default env_reset strips OMARCHY_ALLOW_DIRECT_PACMAN before pacman ever sees it, so the guard reads -Syu off /proc and aborts anyway. Both lines fail in practice.
Bypassing is the whole point of the message: you skip the snapshot (no rollback target if the upgrade breaks the desktop), the keyring refresh, the migrations and the post-update hooks. The usual result of repeated bypasses is a desktop that starts but with a broken bar, theme or portal, because configs written for the newer library versions never landed. Always follow a bypass with omarchy-migrate. Do not rm the hook file itself. The /etc/pacman.d/hooks symlink override is the reversible way, and deleting the packaged file just means the next upgrade silently restores the guard.
Symptom
Any direct system upgrade aborts before a single package is touched:
:: Checking Omarchy update entrypoint...
Woah partner...
This looks like a direct pacman system upgrade. Omarchy updates should normally
run through:
omarchy update
...
error: command failed to execute correctly
Hits sudo pacman -Syu, yay -Syu, paru -Syu, and any GUI frontend that shells out to them. Installing a single package (pacman -S foo) still works.
Cause
The omarchy package installs an ALPM PreTransaction hook, /usr/share/libalpm/hooks/00-omarchy-update-guard.hook, with AbortOnFail, Operation = Upgrade, Type = Package, Target = *, running /usr/bin/omarchy-update-pacman-guard. The guard reads the invoking pacman's command line from /proc/$PPID/cmdline and exits non-zero when it sees both a sync flag and a sysupgrade flag (-S + -u, -Syu, --sync --sysupgrade). It allows the transaction when OMARCHY_UPDATE_PACMAN=1 (set by Omarchy's own update commands) or OMARCHY_ALLOW_DIRECT_PACMAN=1 (your explicit opt-out). It exists because a raw -Syu skips the transcript, the pre-update snapshot, the keyring refresh, the per-user migrations, the post-update hooks and the shell restart.
Fix
# The blessed path
omarchy update
# Deliberate one-off bypass for pacman itself - this exact command is what the
# guard prints
sudo env OMARCHY_ALLOW_DIRECT_PACMAN=1 pacman -Syu
**AUR helpers need a different approach.** Never run yay or paru under sudo. They refuse it and build as an unprivileged user by design. And exporting the variable in your own shell is not enough either: the helper invokes its own sudo pacman -Syu, and sudo's default env_reset strips the variable before pacman sees it, so the guard still aborts. Split the upgrade instead: -Sua is AUR-only and never triggers the guard:
# repo half (guard bypassed explicitly)
sudo env OMARCHY_ALLOW_DIRECT_PACMAN=1 pacman -Syu
# AUR half (no guard involved)
yay -Sua # or: paru -Sua
If you really want yay -Syu in one shot, the variable has to survive the helper's internal sudo. Either pass it through sudo explicitly:
OMARCHY_ALLOW_DIRECT_PACMAN=1 yay -Syu \
--sudoflags "--preserve-env=OMARCHY_ALLOW_DIRECT_PACMAN"
or whitelist it once in sudoers (sudo visudo -f /etc/sudoers.d/omarchy-direct-pacman):
Defaults env_keep += "OMARCHY_ALLOW_DIRECT_PACMAN"
# After ANY bypass, run the per-user migrations the guard exists to protect.
# Omarchy otherwise only nudges you at your next graphical login.
omarchy-migrate --pending # prints pending names, exits 0 if any are pending
omarchy-migrate
omarchy-hook post-update # runs your ~/.config/omarchy/hooks/post-update{,.d}
If you genuinely want the guard off permanently, do not delete the hook. It is package-owned and returns on the next omarchy upgrade. Shadow it from the higher-priority hook directory instead, which alpm-hooks(5) documents as the supported way ("Hooks may be disabled by overriding them with a symlink to /dev/null"):
sudo mkdir -p /etc/pacman.d/hooks
sudo ln -sf /dev/null /etc/pacman.d/hooks/00-omarchy-update-guard.hook
# undo:
sudo rm /etc/pacman.d/hooks/00-omarchy-update-guard.hook
Verify
sudo env OMARCHY_ALLOW_DIRECT_PACMAN=1 pacman -Syu runs the transaction. omarchy-migrate --pending prints nothing and exits non-zero once migrations are applied.
Sources
- https://raw.githubusercontent.com/basecamp/omarchy/quattro/bin/omarchy-update-pacman-guard
- https://raw.githubusercontent.com/basecamp/omarchy/quattro/default/libalpm/hooks/00-omarchy-update-guard.hook
- https://raw.githubusercontent.com/basecamp/omarchy/quattro/docs/update-process.md
- https://raw.githubusercontent.com/basecamp/omarchy/quattro/bin/omarchy-migrate
- https://man.archlinux.org/man/alpm-hooks.5.en
- https://learn.omacom.io/2/the-omarchy-manual/68/updates