OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
pacman-aur high rare DISPUTE

Unwedge an update blocked by thousands of '/usr/lib/modules/<kver>/... exists in filesystem'

omarchyarchkernel-modules-hookliminedesktoplaptop
AUDITED Audited against its sources and confirmed accurate. · checked against Omarchy omarchy 4.0.4-1 on 2026-10-05
AUDIT NOTE

Issue #9142 and PR #9285 both read in full and both still open today. They support the mechanism exactly: downgrade while booted, the post hook restores the running tree unowned, the conflict check runs before PreTransaction hooks, and linux-modules-cleanup.service skips the running kver. Confirmed locally on kernel-modules-hook 0.1.7-3: the pre and post hooks rsync /usr/lib/modules/$(uname -r) to backup and back, the service skips %v and owned trees and moves the rest to /usr/lib/modules/.old/, the tmpfiles rule is R! /usr/lib/modules/.old/* - - - 4w, the service is enabled, and the package is in /usr/share/omarchy/install/omarchy-base.packages and enabled by install/config/enable-services.sh. Confirmed locally that 4.0.4-1 omarchy-update-system-pkgs-when-conflicted only takes omarchy(-dev|-settings|-settings-dev): ... exists in filesystem lines, so linux: conflicts fall through. The ALPM guard (/usr/bin/omarchy-update-pacman-guard) exits 0 when OMARCHY_ALLOW_DIRECT_PACMAN=1 and its own message recommends sudo env OMARCHY_ALLOW_DIRECT_PACMAN=1 pacman -Syu. The record uses -Syu where the reporter used pacman -S linux --overwrite, which is the safer form. /tmp/omarchy-update.log is the script transcript named in omarchy-update. The overwrite glob is scoped and the danger field covers it. Not reproduced.

RISK

--overwrite replaces files without asking. Use it only after confirming every conflict is under /usr/lib/modules/$(uname -r)/ and that path is unowned. A wider glob can overwrite files that belong to another package. Running pacman directly with OMARCHY_ALLOW_DIRECT_PACMAN=1 skips Omarchy's snapshot, keyring and migration steps, which is why omarchy update is run immediately afterwards.

Symptom

omarchy update (or pacman -Syu) aborts before installing anything, with thousands of conflict lines, all inside one kernel version's module directory:


error: failed to commit transaction (conflicting files)
linux: /usr/lib/modules/7.1.9-arch1-2/kernel/... exists in filesystem
linux: /usr/lib/modules/7.1.9-arch1-2/modules.order exists in filesystem
...
Errors occurred, no packages were upgraded.

Omarchy prints only Something went wrong during the update!. Every later update fails the same way until something changes.

Cause

Omarchy installs kernel-modules-hook. Its pre and post transaction hooks save the running kernel's module tree before a kernel package changes and copy it back afterwards, so a running system keeps working modules. When the kernel package is downgraded while that kernel is running (a channel switch or a release migration can do this), the hook restores the running version's whole tree, which now belongs to no package. If the repositories later offer that same kernel version again and you have not rebooted, pacman's file conflict check sees every file of the package already on disk, unowned, and refuses. The check runs before any PreTransaction hook, so the hook never gets the chance to move the tree. The hook's linux-modules-cleanup.service, which runs at boot, deliberately skips the running kernel's tree. Omarchy's conflict handler (omarchy-update-system-pkgs-when-conflicted on 4.0.4) only clears unowned paths reported against the omarchy packages, so it does not clear this one. Upstream issue #9142 and its fix PR #9285 were still open on 2026-10-04.

Fix

Confirm it is this case: every conflict is under the running kernel's directory and that directory is unowned.


uname -r
pacman -Qo /usr/lib/modules/$(uname -r)
grep 'exists in filesystem' /tmp/omarchy-update.log | grep -vc "/usr/lib/modules/$(uname -r)/"

No package owns from the second command and 0 from the third mean it matches. (/tmp/omarchy-update.log is Omarchy's transcript. On plain Arch, read the pacman output.)

**Option 1, preferred: reboot first.** You boot the kernel that is actually installed, linux-modules-cleanup.service moves the now non-running unowned tree into /usr/lib/modules/.old/ (a tmpfiles rule purges it after 4 weeks), and the update goes through:


systemctl reboot
# after logging back in
omarchy update          # Omarchy 4
sudo pacman -Syu        # plain Arch

**Option 2, no reboot.** Let pacman take ownership of that one tree in a full upgrade. Scope the overwrite to the running kernel's directory only:


# Omarchy 4: one guarded bypass, then let omarchy update run its remaining steps
sudo env OMARCHY_ALLOW_DIRECT_PACMAN=1 pacman -Syu --overwrite "/usr/lib/modules/$(uname -r)/*"
omarchy update

# plain Arch with kernel-modules-hook
sudo pacman -Syu --overwrite "/usr/lib/modules/$(uname -r)/*"

Verify

pacman -Qo /usr/lib/modules/$(uname -r) names the kernel package, and omarchy update (or pacman -Syu) completes with no conflicting files.

Sources

kernel-modules-hook-unowned-tree-exists-in-filesystem