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

Stop large AUR builds failing with 'No space left on device' on a tmpfs /tmp

archomarchyendeavouroscachyosdesktoplaptop
CORRECTED An auditor found the fix wrong or incomplete and rewrote it. · checked against Omarchy omarchy 4.0.4-1 on 2026-10-05
AUDIT NOTE

What held, checked on this machine: /tmp is tmpfs from systemd's tmp.mount with size=50%% (16G on 31 GiB RAM), /etc/makepkg.conf line 79 is #BUILDDIR=/tmp/makepkg, and /etc/makepkg.conf.d holds only fortran.conf and rust.conf. makepkg(8) lists BUILDDIR as an environment override. makepkg.conf(5) gives the user config order ($XDG_CONFIG_HOME/pacman/makepkg.conf after the system file). yay.8 documents --builddir and AURDEST, and yay's dirs.go defaults to $XDG_CACHE_HOME/yay. The Makepkg wiki has the BUILDDIR=/tmp/makepkg tip and its warning about large packages, and the Tmpfs wiki has the remount commands. What the record misses: systemd 261 on this machine mounts /tmp with usrquota (findmnt shows it, and tmp.mount carries x-systemd.graceful-option=usrquota). The Tmpfs wiki says that since systemd v258 each user gets a quota of 80% of the tmpfs size, and that remounting larger does not raise it. So on Omarchy 4 the build usually fails with Disk quota exceeded at about 80% full, not at 100% with No space left on device. The record's resize recipe also does not help unless the quota is raised too. Symptom, cause, fix and danger are rewritten to cover the quota. Not exercised: I did not read my user's actual quota value, because quota-tools is not installed, and I ran no build.

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

Do not mount -o remount a smaller size onto a /tmp that is in use, and do not mount -a after editing fstab with files in /tmp: running programs lose their lock and socket files there. Growing the tmpfs or raising the /tmp quota lets a build consume RAM and swap, which on a small machine trades this error for an out-of-memory kill. Set any setquota limit below the tmpfs size you mounted.

Symptom

A big AUR package (a browser, an Electron app, a Rust or Go project, a toolchain) fails partway through compiling or packaging with one of these:


... Disk quota exceeded
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: <pkgname>

... No space left on device
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: <pkgname>

Small packages build fine. df -h / shows plenty of free disk, but df -h /tmp climbs while the build runs and frees itself the moment the build dies. On systemd 258 and later, Omarchy 4 included, the usual message is Disk quota exceeded with /tmp only about 80% full, because the per-user quota on /tmp runs out before the tmpfs does.

Cause

/tmp is a tmpfs on Arch and Omarchy 4, mounted by systemd's tmp.mount with size=50%, so its ceiling is half of RAM (16G on a 32 GB machine, checked on Omarchy 4.0.4-1 with df -h /tmp and systemctl cat tmp.mount). It is not a disk. Since systemd v258, /tmp is also mounted with usrquota (present on Omarchy 4.0.4-1, systemd 261), and the Arch wiki says each user gets 80% of the tmpfs size. A build running as your user therefore fails with Disk quota exceeded when its files reach about 40% of RAM, before the tmpfs itself is full.

An AUR build only lands there when something points it there:

  1. BUILDDIR=/tmp/makepkg in /etc/makepkg.conf, a drop-in under /etc/makepkg.conf.d/, or a user makepkg.conf. The Arch wiki suggests exactly this for speed and warns to avoid it for large packages. makepkg then puts src/ and pkg/ under $BUILDDIR, whichever helper called it.
  2. An AUR helper whose build directory was moved to /tmp (yay --builddir, AURDEST, paru's CloneDir).
  3. Build tools that write their own scratch files under $TMPDIR (default /tmp) even when the source tree is on disk.

yay's own default is $XDG_CACHE_HOME/yay, falling back to ~/.cache/yay, which is on disk. A stock Omarchy 4 /etc/makepkg.conf ships #BUILDDIR=/tmp/makepkg commented out, so a stock machine only hits this through case 3 or a setting the user added.

Fix

Find which of the three it is:


findmnt /tmp                     # FSTYPE tmpfs, and whether usrquota is set
df -h /tmp /home
grep -nE '^\s*BUILDDIR' /etc/makepkg.conf /etc/makepkg.conf.d/*.conf \
  ~/.config/pacman/makepkg.conf ~/.makepkg.conf 2>/dev/null
grep -n builddir ~/.config/yay/config.json 2>/dev/null
echo "AURDEST=$AURDEST TMPDIR=$TMPDIR"

If a BUILDDIR under /tmp turns up, the simplest fix is to comment it out where you set it. To keep it for small packages but build one large package on disk, override it for that run only:


mkdir -p ~/.cache/makepkg-build
BUILDDIR=$HOME/.cache/makepkg-build yay -S <pkgname>

To move it permanently for your user without touching /etc, set it in the user config, which makepkg reads after the system file:


mkdir -p ~/.config/pacman ~/.cache/makepkg-build
echo 'BUILDDIR="$HOME/.cache/makepkg-build"' >> ~/.config/pacman/makepkg.conf

If it is the build tool's scratch space (case 3), point TMPDIR at disk for that build:


mkdir -p ~/.cache/tmp-build
TMPDIR=$HOME/.cache/tmp-build yay -S <pkgname>
rm -rf ~/.cache/tmp-build

Moving the build to disk avoids both the tmpfs size and the per-user quota, and is the fix to prefer.

Growing the tmpfs instead is a temporary change until the next reboot. It uses RAM and swap, so only do it on a machine with memory to spare. On systemd 258 and later (Omarchy 4), a remount does not raise the per-user quota, so a larger /tmp alone does not stop Disk quota exceeded. The Arch wiki Tmpfs page raises the quota with setquota from quota-tools. Keep the limit below the new tmpfs size:


findmnt -no OPTIONS /tmp | tr , '\n' | grep quota    # usrquota: a per-user limit applies
sudo mount -o remount,size=80% /tmp
sudo pacman -S quota-tools
sudo setquota -u "$USER" 20G 20G 0 0 /tmp

Omarchy 4: omarchy update runs yay -Sua with your user's environment and makepkg configuration, so a persistent fix belongs in ~/.config/pacman/makepkg.conf. An exported TMPDIR in one terminal does not reach a later update. Retry the failed package with yay -S <pkgname> after the change.

Verify

Re-run the build and watch df -h /tmp in a second terminal: it should stay flat. The package installs and pacman -Q <pkgname> shows the new version.

Sources

aur-build-no-space-left-tmpfs-tmp