Fix btrfs "No space left on device" while df still shows free space
The core claim holds. The Arch wiki Btrfs page confirms that df cannot account for chunk allocation and that btrfs filesystem usage is the right diagnostic, and it confirms the staged balance and --bg plus balance status sequence. The cause needed no change. Four things were wrong or missing for Omarchy 4. First, the verify line ended with pacman -Syu, which /usr/share/libalpm/hooks/00-omarchy-update-guard.hook aborts with AbortOnFail via /usr/bin/omarchy-update-pacman-guard, confirmed on this machine. The previous auditor spotted this in the note and nobody applied it. Second, the closing advice that old snapshots are usually the real consumer is mis-specialised. Confirmed on this machine, /etc/snapper/configs/root is Omarchy's own file with SUBVOLUME="/", NUMBER_LIMIT="5" and TIMELINE_CREATE="no", so a current install holds at most five root snapshots and deleting them reclaims little. The genuine Omarchy sink is leaked timeline snapshots from earlier defaults, which number cleanup never reaps because man snapper documents the two algorithms separately. Upstream ships a drain migration for exactly this, which I read at /usr/share/omarchy/migrations/1784809452.sh and whose behaviour is pinned by test/shell.d/snapper-timeline-leak-test.sh in the quattro tree. Third, findmnt -t btrfs on this machine shows four subvolumes, @, @home, @log and @pkg, matching the archinstall layout in tools/make-test-vm.sh, so /home and /var/cache/pacman/pkg are outside the root snapshot and snapper -c root delete can never reclaim them. The fix now names paccache -rk2 and points at the right subvolumes. Fourth, the record told a reader whose balance cannot allocate to delete snapshots, with no answer for a machine that has none. The wiki names the temporary btrfs device add route, which is now included. I also verified as an unprivileged user that btrfs filesystem df / exits 0 with no sudo, which the wiki states explicitly, so the old note's instruction to add sudo there was wrong and the fix keeps it unprivileged. Added: omarchy update refuses to start under 10 GiB free on / per /usr/share/omarchy/bin/omarchy-update-requires-free-space, so the automatic drain is unavailable on an already-full disk. Severity critical and frequency common are left alone as correct. Both cited URLs resolve and support the generic claims, so nothing was removed. NOT exercised: I have no sudo, so no balance, no snapshot delete, no paccache run and no btrfs device add was executed, and the ENOSPC condition itself was not induced. The 191 GiB free on this root means the failure state could only be reasoned about, not reproduced.
A full btrfs balance rewrites every chunk on the filesystem. It can take hours, hammers the disk, and must not be interrupted by a hard power-off. Always start with -dusage=10. Metadata is the riskier half, so if -dusage=10 -musage=10 fails, retry data only with -dusage=10. If the filesystem is so full that balance cannot allocate a chunk at all, add a temporary device rather than forcing it. Deleting snapshots is irreversible. On Omarchy 4 each snapshot is also a Limine boot entry, visible with limine-list, so deleting the number snapshots removes the pre-update recovery entries that omarchy-snapshot restore offers. limine-snapper-sync.service resyncs the entry list, so a deletion leaves no dead boot entry behind while that service is enabled and active. Never delete the snapshot you are currently booted into. paccache -rk2 keeps two cached versions of each package and discards the rest, which costs the offline downgrade path for the older ones.
Symptom
Writes fail with No space left on device and pacman refuses to install anything, but df -h / shows several GB free. Deleting files barely helps.
Cause
Btrfs allocates disk in chunks for data and metadata separately. Once all raw space is allocated to chunks, a write can fail even though the chunks are half-empty. df reports file-level free space and does not account for chunk allocation or metadata, so it lies about this situation.
Fix
Look at the real picture first. btrfs filesystem df needs no root, and btrfs filesystem usage shows per-device detail only as root:
btrfs filesystem df /
sudo btrfs filesystem usage /
If Device allocated is close to Device size while Free (estimated) is much larger, reclaim mostly-empty chunks by rebalancing only lightly-used ones (fast, low IO):
sudo btrfs balance start -dusage=10 -musage=10 /
sudo btrfs balance status /
If that is not enough, raise the threshold gradually, data first:
sudo btrfs balance start -dusage=50 /
Or run a full background balance:
sudo btrfs balance start --bg /
sudo btrfs balance status /
If balance itself fails with No space left on device because it cannot allocate a new chunk, give it temporary room instead of forcing it. Add a spare device or loop file, balance, then remove it:
sudo btrfs device add -f /dev/<usb-or-loop> /
sudo btrfs balance start -dusage=10 /
sudo btrfs device remove /dev/<usb-or-loop> /
Now find what is actually holding the space. On Omarchy 4, and on any stock four-subvolume install, /home and the pacman cache sit on their own subvolumes (@home, @pkg), so a root snapshot never pins them and deleting snapshots never reclaims them:
findmnt -t btrfs
sudo btrfs filesystem du -s /var/cache/pacman/pkg /var/log
sudo paccache -rk2
**Omarchy 4.** Snapper here is configured for pre-update recovery only: /etc/snapper/configs/root carries SUBVOLUME="/", NUMBER_LIMIT="5" and TIMELINE_CREATE="no", so at most five root snapshots exist and deleting them frees little. The exception is a machine installed under Omarchy's earlier defaults, which took hourly timeline snapshots. Those are never reaped, because number cleanup only reaps number-marked snapshots. Count them:
sudo snapper -c root --csvout list --columns number,cleanup | awk -F, '$2 == "timeline"' | wc -l
If that is more than a handful, let the update drain them. omarchy update runs a migration that deletes exactly the timeline ones:
omarchy update
omarchy update refuses to start with less than 10 GiB free on /, so on an already-full disk free that much first or drain by hand in batches of about 20:
sudo snapper -c root --csvout list --columns number,cleanup |
awk -F, '$2 == "timeline" { print $1 }' | head -20 |
xargs sudo snapper -c root delete --sync
Repeat until the count is zero, and leave the number snapshots alone: those are the recovery points.
**Plain Arch, EndeavourOS, CachyOS, Manjaro.** Old timeline snapshots usually are the real consumer. List them and delete a range you do not need:
sudo btrfs subvolume list /
sudo snapper -c root list
sudo snapper -c root delete --sync 20-140
Verify
sudo btrfs filesystem usage / shows Device allocated meaningfully below Device size, and writes succeed again. On Omarchy 4, confirm through the update entrypoint rather than pacman directly, because the 00-omarchy-update-guard.hook ALPM hook aborts a direct pacman -Syu:
sudo btrfs filesystem usage /
omarchy update
On plain Arch use sudo pacman -Syu. Btrfs frees the extents of a deleted snapshot in the background, so allow a minute before reading the numbers again, or pass --sync to snapper delete.