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

Update aborts with 'exists in filesystem' file conflicts in /usr/share/omarchy

omarchy-4archendeavouroscachyosmanjaro
CORRECTED An auditor found the fix wrong or incomplete and rewrote it.
AUDIT NOTE

Re-audited against the scripts as installed on this workstation (omarchy 4.0.2-1, omarchy-settings 4.0.2-1, kernel 7.1.9-arch1-2) and against omacom/omarchy@quattro. The core of the record held. Confirmed on this machine: the primary transaction really is sudo env LC_ALL=C OMARCHY_UPDATE_PACMAN=1 pacman -Syu --noconfirm --overwrite '/usr/share/omarchy/*', and step 3's one-liner is byte-for-byte the conflict handler's interactive last resort in /usr/share/omarchy/bin/omarchy-update-system-pkgs. The -Qo first step, the "report it, do not delete" instinct, the scoped glob, the ban on --overwrite '*' and the corrupt-local-database remedy all match the ArchWiki Pacman page, which warns against --overwrite generally and recommends pacman -Qo then rename. /usr/share/libalpm/hooks/00-omarchy-update-guard.hook triggers on Operation = Upgrade and omarchy-update-pacman-guard needs both a sync and a sysupgrade flag, so the record's pacman -S --overwrite ... omarchy passes the guard and starts no partial upgrade. Three things were wrong. First, the verify step: run unprivileged as written, pacman -Qkk omarchy omarchy-settings reported omarchy-settings: 629 total files, 4 altered files on this machine, all four being permission-denied warnings on /etc/sudoers.d/omarchy-*, so the reader sees a failure that is not one. Second, the cause said the handler "moves the unowned ones" and omitted its two hard limits, which I read in the script: the regex recognises only the four omarchy* package names, and the all-or-none gate ((${#leftovers[@]} == $(grep -c ' exists in filesystem' "$errors"))) aborts the whole recovery if any line in the report is not one of them. Third, applies_to claims arch, endeavouros, cachyos and manjaro, but every step after step 1 referenced omarchy update, /var/lib/omarchy/replaced or OMARCHY_UPDATE_PACMAN=1, none of which exist there, and there was no branch for a conflict on an Omarchy box whose path lies outside /usr/share/omarchy, where the scoped glob does nothing. The fix now labels those branches. One forward-looking note, not a defect today: upstream commit f5194e3f of 2026-09-13 replaces the inline sudo env OMARCHY_UPDATE_PACMAN=1 pacman call with a new bin/omarchy-update-pacman wrapper that runs the transaction under systemd-run --scope so a systemd upgrade's user-manager reexec cannot kill pacman mid-transaction. That binary is not in 4.0.2-1 (ls /usr/share/omarchy/bin/omarchy-update-pacman fails, and pacman -Ql omarchy lists only the guard), so the record's command is still correct for the shipping release and will need revisiting after the next one. NOT exercised: I ran no upgrade, induced no conflict, and did not watch the handler quarantine a file, so the recovery path is read from source rather than observed.

The cause above was rewritten on 2026-09-13 to match this note; the fix was corrected by the audit itself.
RISK

Never widen the glob to --overwrite '*'. It will silently clobber files owned by other packages and is the single fastest way to make a system unrepairable. Only overwrite a path you have confirmed with pacman -Qo is unowned. Move conflicting files instead of deleting them: on this system sddm.conf.d and systemd/system-sleep are read wholesale, so a copy left *beside* the original would still be live, which is exactly why Omarchy quarantines to a mirrored path under /var/lib/omarchy/replaced rather than renaming in place.

Symptom

An update stops with:


error: failed to commit transaction (conflicting files)
omarchy: /usr/share/omarchy/bin/omarchy-foo exists in filesystem
Errors occurred, no packages were upgraded.

Run through omarchy update you may instead see it recover by itself with a yellow "Taking over files pacman doesn't own yet:" block. Run by hand with pacman -Syu there is no recovery and every subsequent attempt fails the same way. A different, easily confused error is :: package X and package Y are in conflict. Remove Y? [y/N], where --noconfirm answers No and the whole upgrade stops.

Cause

pacman refuses by design to install over a file that no package owns. On Omarchy this is common because /usr/share/omarchy gets written by installers, migrations and hand edits as well as by the omarchy package, and because pre-Quattro installs left files behind that the packaged layout now claims. Omarchy's own path already anticipates this: omarchy-update-system-pkgs runs pacman -Syu --noconfirm --overwrite '/usr/share/omarchy/*', and on failure execs omarchy-update-system-pkgs-when-conflicted, which greps the pacman stderr report for ^omarchy(-dev|-settings|-settings-dev)?: <path> exists in filesystem, re-checks each path with pacman -Qo, moves the unowned ones under /var/lib/omarchy/replaced/<original path>, retries once, and puts them back if the retry did not claim them.

That recovery is narrower than it looks, and its two limits decide whether you get it at all. The regex matches only those four Omarchy package names, so a conflict reported against any other package is never a candidate. And the handler is all or nothing: it compares the number of unowned Omarchy paths it found against grep -c ' exists in filesystem' over the whole report and exits without moving anything unless the two match. One conflict from another package in the same report therefore disables the recovery for every path in it, and you see the raw pacman failure with no yellow banner.

A package-vs-package conflict is a decision rather than a cleanup, so it is deliberately handed back to you for an interactive answer and is never auto-resolved under -y.

Fix


# 1. ALWAYS first: does a package own the file?
#    Owned    -> this is a packaging bug. Report it upstream, do not delete.
#    Unowned  -> it is a leftover and is yours to move aside.
pacman -Qo /usr/share/omarchy/bin/omarchy-foo

**A. Unowned, and the path is under /usr/share/omarchy (Omarchy 4)**

Move it aside the way the updater does, into a mirrored path, then retry. Do not delete it and do not leave a copy beside the original.


sudo mkdir -p /var/lib/omarchy/replaced/usr/share/omarchy/bin
sudo mv -T --backup=numbered /usr/share/omarchy/bin/omarchy-foo \
        /var/lib/omarchy/replaced/usr/share/omarchy/bin/omarchy-foo
omarchy update

If you want the one-liner instead, this is exactly the command the conflict handler runs as its interactive last resort on 4.0.2-1, guard flag included. The glob is scoped to Omarchy's own tree on purpose:


sudo env OMARCHY_UPDATE_PACMAN=1 pacman -Syu --overwrite '/usr/share/omarchy/*'

**B. Unowned, but the path is NOT under /usr/share/omarchy, or you are on plain Arch, EndeavourOS, CachyOS or Manjaro**

There is no automatic recovery for this and the one-liner above will not help, because its glob does not cover the path. omarchy-update-system-pkgs-when-conflicted only recognises paths reported against omarchy, omarchy-dev, omarchy-settings and omarchy-settings-dev, and it refuses to move anything unless every exists in filesystem line in the report is one of those, so a single conflict from another package turns the recovery off for the whole run. Do it by hand, naming the exact path:


# Rename, never widen the overwrite glob to cover someone else's files.
sudo mv -T --backup=numbered /path/to/conflicting/file /path/to/conflicting/file.bak

# Then re-run the upgrade the way your system expects:
omarchy update            # Omarchy 4
sudo pacman -Syu          # plain Arch, EndeavourOS, CachyOS, Manjaro

Once the upgrade has succeeded and the package has claimed the path, the .bak copy can be removed.

**C. A package-vs-package conflict**

:: package X and package Y are in conflict. Remove Y? [y/N] is a decision, not a cleanup. Run the update interactively so you can answer. Never use -y here: it promises not to ask, so the step reports and skips instead.


omarchy update            # Omarchy 4, no -y
sudo pacman -Syu          # plain Arch

**D. A corrupt local package database entry**

The classic ArchWiki case is an empty or missing /var/lib/pacman/local/<pkg>-<ver>/files, which makes one package report conflicts on files it already owns. Reinstall that one package with a scoped overwrite. pacman -S carries no sysupgrade flag, so it passes the Omarchy guard on its own:


sudo pacman -S --overwrite '/usr/share/omarchy/*' omarchy   # Omarchy 4
sudo pacman -S --overwrite '/usr/lib/foo/*' foo             # plain Arch, scoped to that package

**E. See what was quarantined on your behalf (Omarchy 4 only)**


sudo find /var/lib/omarchy/replaced -type f -o -type l

Verify

Run the file check as **root**. pacman -Qkk counts a file it cannot read as altered, so an unprivileged run is misleading: on this Omarchy 4.0.2-1 workstation pacman -Qkk omarchy omarchy-settings as a normal user reports omarchy-settings: 629 total files, 4 altered files, and all four are permission-denied warnings on /etc/sudoers.d/omarchy-*.


sudo pacman -Qkk omarchy omarchy-settings
omarchy update
sudo find /var/lib/omarchy/replaced -type f -o -type l

Expect 0 altered files for both packages, omarchy update to complete, and find to list only files you expect to have been taken over. On plain Arch and the other derivatives, use sudo pacman -Qkk <package> and sudo pacman -Syu. There is no /var/lib/omarchy/replaced to check.

Sources

pacman-file-exists-in-filesystem-omarchy