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

Full filesystem during an upgrade: download-phase write errors vs commit-phase CheckSpace abort

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

Read libalpm sync.c, diskspace.c, util.c, handle.c and error.c from gitlab.archlinux.org. CheckSpace guards both phases, not only commit: sync.c calls _alpm_check_downloadspace against the cache directory before any download starts (line 797) and _alpm_check_diskspace before commit (line 1319), both printing 'Partition <mountpoint> too full: N blocks needed, N blocks free' then 'not enough free disk space'. The record's claim that the download phase 'dies mid-download' is only true when CheckSpace is off or space vanishes during the download, so the cause was rewritten. Omarchy 4 layout confirmed from /etc/fstab here and tools/make-test-vm.sh (the ISO configurator layout): one btrfs with @ on /, @home, @log on /var/log and @pkg on /var/cache/pacman/pkg. /var is not a separate mount, so the example 'Partition /var too full' was generalised. Snapper's only config is root with SUBVOLUME="/" (default/snapper/root, identical upstream and local), so snapshots pin /usr and /var/lib but never the package cache or the journal, which the record did not say. The 10 GiB string is verbatim from bin/omarchy-update-requires-free-space (identical to quattro), and bin/omarchy-update calls it BEFORE omarchy-update-pkg-prune and omarchy-snapshot, so under 10 GiB omarchy update refuses without pruning anything. Added the manual prune (omarchy-update-pkg-prune, which is sudo paccache -rk2, matching the record's -rk2 advice) and the OMARCHY_UPDATE_FORCE=1 bypass. Snapshot count: omarchy-snapshot create runs snapper create -c number then cleanup number with NUMBER_LIMIT=5, and snapper-cleanup.timer is enabled here, so a stock install holds at most 5 snapshots (6 briefly, per etc/limine-entry-tool.d/omarchy-defaults.conf). Snapshots are Limine boot entries: limine-snapper-sync 1.31.0-1 is installed and BOOT_ORDER contains Snapshots. Added --sync from the Snapper wiki so freed space shows immediately. The escape hatch and the retry used sudo pacman -Syu, which the Omarchy guard rejects, so both now carry OMARCHY_ALLOW_DIRECT_PACMAN=1 in a labelled branch. pacman 7 with DownloadUser=alpm creates a download-XXXXXX subdirectory chowned to alpm inside the cache dir (util.c _alpm_download_dir_setup), so a root-owned --cachedir works. The 'even pacman -Sc fails' line is now explained rather than asserted: -Sc takes the database lock (src/pacman/sync.c line 910) by creating /var/lib/pacman/db.lck, which can fail on a full filesystem as 'failed to init transaction (unable to lock database)'. That failure was reasoned from source, not reproduced. btrfs filesystem usage, btrfs filesystem df and balance advice match the Btrfs wiki page. Not exercised: filling a filesystem on a VM.

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

pacman -Scc empties the cache including the versions currently installed, so no offline reinstall and no downgrade path afterwards. journalctl --vacuum-size=0 destroys every boot log, including the ones needed to diagnose why the disk filled. Deleting snapper snapshots is irreversible and removes your rollback points: delete the oldest first and never the snapshot matching your last known-good boot, and remember that on Omarchy those snapshots are also the Limine boot-menu rollback entries. OMARCHY_UPDATE_FORCE=1 skips the 10 GiB check only, the update still needs room for the download and the commit, and a snapshot taken on a nearly full filesystem can itself push it to full. btrfs balance on a nearly-full filesystem can itself fail with ENOSPC and must never be interrupted: free something else first and let it finish, or temporarily add a device as the Btrfs wiki describes. sudo env OMARCHY_ALLOW_DIRECT_PACMAN=1 pacman -Syu upgrades packages without Omarchy's snapshot, migrations or post-update hooks, so run omarchy update afterwards. Never delete anything under /var/lib/pacman: that is the package database, and losing it means pacman no longer knows what is installed.

Symptom

Two distinct failures, and with CheckSpace on (the Arch and Omarchy default) pacman usually stops before either one writes anything.

Before download or before commit (CheckSpace measuring the cache directory, then the install targets):


error: Partition / too full: 1450000 blocks needed, 12000 blocks free
error: not enough free disk space
error: failed to commit transaction (not enough free disk space)

The mount point named is the one that ran out. On Omarchy 4 the package cache is its own subvolume, so the download check names /var/cache/pacman/pkg and the commit check names /. Both live on the same btrfs, so the free figure is shared.

Mid-download (space ran out while downloading, or CheckSpace is commented out):


error: failed retrieving file 'chromium-...-x86_64.pkg.tar.zst' from mirror : Failed writing received data to disk/application
warning: failed to retrieve some files
error: failed to commit transaction (failed to retrieve some files)

On Omarchy 4, omarchy update refuses to start at all below 10 GiB free on /:


You need at least 10 GiB free to safely update Omarchy.

Worst case df -h / shows 100% and even sudo pacman -Sc fails with failed to init transaction (unable to lock database), because pacman cannot create /var/lib/pacman/db.lck.

Cause

pacman needs room twice: once for the downloaded .zst packages in /var/cache/pacman/pkg, and again for the extracted files at commit time. With CheckSpace enabled (it is, in Arch's stock pacman.conf and in Omarchy's default/pacman/pacman-stable.conf) libalpm checks both: the total download size against the cache directory's mount point before downloading, and the installed size against every affected mount point before commit, with a cushion of 5% of the filesystem or 20 MiB, whichever is smaller. A Failed writing received data error mid-download therefore means space vanished during the download (another process writing, or btrfs metadata exhaustion that statvfs does not see) or CheckSpace was turned off. An interrupted download leaves .part files behind, on pacman 7 inside a download-XXXXXX directory in the cache.

On btrfs, the default on Omarchy and CachyOS, df can report free space while the metadata chunks are exhausted, and snapshots pin the old version of every file an update replaced. Omarchy 4 installs one btrfs filesystem with subvolumes @ on /, @home, @log on /var/log and @pkg on /var/cache/pacman/pkg. Snapper's only config, root, snapshots @, so a snapshot pins /usr, /opt and /var/lib but not the package cache and not the journal: pruning those two frees space immediately, deleting a file under /usr frees nothing until every snapshot holding it is gone. omarchy update creates one number snapshot per run and keeps NUMBER_LIMIT="5", so five updates' worth of replaced files stay allocated on a stock install.

Fix

**Reclaim in this order, least destructive first.** Start by measuring:


df -h / /boot
sudo du -xhd1 /var | sort -h | tail
sudo btrfs filesystem usage /        # btrfs: look at Metadata and Unallocated
btrfs filesystem df /                # same numbers without root

**Omarchy 4 first:** omarchy update checks for 10 GiB free on / before it prunes the cache or takes a snapshot, so below that it refuses and frees nothing. Prune by hand, then retry:


omarchy-update-pkg-prune            # runs: sudo paccache -rk2 (do not prefix with sudo)
omarchy update

To run an update anyway with less than 10 GiB free:


OMARCHY_UPDATE_FORCE=1 omarchy update

**1. Journal, biggest instant win, always safe:**


journalctl --disk-usage
sudo journalctl --vacuum-size=200M

**2. Package cache, keep 2 versions so you can still downgrade** (this is exactly what omarchy update does on every run):


sudo pacman -S --needed pacman-contrib
sudo paccache -rk2
sudo paccache -ruk0            # drop everything for packages you no longer have

**3. Interrupted-download leftovers** (pacman 7 puts them in a download-XXXXXX subdirectory, the find recurses into it):


sudo find /var/cache/pacman/pkg -name '*.part' -delete

**4. Build and user caches:**


yay -Sc
rm -rf ~/.cache/yay/* ~/.cache/paru/clone/* ~/.cache/thumbnails ~/.cache/mesa_shader_cache*

**5. Btrfs snapshots, what actually frees a full Omarchy root.** A stock Omarchy 4 keeps at most 5 (NUMBER_LIMIT="5" in /etc/snapper/configs/root, cleaned by snapper-cleanup.timer), so more than that means the timer is off or the config was changed. Delete the oldest, never the newest, and use --sync so the space is returned before you measure again:


sudo snapper -c root list
sudo snapper -c root delete --sync 12-14   # oldest numbers first, keep the latest
sudo btrfs balance start -dusage=50 /
sudo btrfs filesystem usage /

On Omarchy those snapshots are also Limine boot entries (limine-snapper-sync, BOOT_ORDER="*, *fallback, Snapshots"), and limine-snapper-sync.service drops the entry when the snapshot goes.

**6. Old kernels / UKIs on a full /boot:** see the ESP-full record.

**Escape hatch when nothing can be freed:** download to another disk for this one transaction. pacman 7 creates an alpm-owned download-XXXXXX directory inside the path you give, so a root-owned directory is fine.

Plain Arch:


sudo mkdir -p /run/media/$USER/BIGDISK/pkgcache
sudo pacman -Syu --cachedir /run/media/$USER/BIGDISK/pkgcache

Omarchy 4 (the update guard rejects a bare pacman -Syu, and this bypasses omarchy update's snapshot and migrations, so run omarchy update afterwards):


sudo mkdir -p /run/media/$USER/BIGDISK/pkgcache
sudo env OMARCHY_ALLOW_DIRECT_PACMAN=1 pacman -Syu --cachedir /run/media/$USER/BIGDISK/pkgcache
omarchy update

**Then retry:**

Plain Arch:


sudo pacman -Syu

Omarchy 4:


omarchy update

Verify

df -h / shows more than 10 GiB free (Omarchy's own hard threshold in omarchy-update-requires-free-space). sudo btrfs filesystem usage / shows non-zero Device unallocated. sudo pacman -Syu or omarchy update runs to completion with no too full or Failed writing received data errors.

Sources

filesystem-full-during-pacman-transaction