Skip to content
Latchkey

CI "/tmp" Full - No Space Left on the Temp Filesystem

The write that failed targeted /tmp, not the main disk. On many runners /tmp is a small partition or a RAM-backed tmpfs, so a build that dumps large temp files there fills it long before the main disk.

What this error means

A compiler, archiver, or test run fails with No space left on device while writing under /tmp, even though df -h / shows the root filesystem has room. df -h /tmp shows the temp filesystem at 100%.

CI log
cc1plus: error: /tmp/ccXXXXXX.s: No space left on device
# or
gzip: /tmp/build-12345.tar.gz: No space left on device

Common causes

/tmp is a small or RAM-backed filesystem

When /tmp is mounted as tmpfs, it is sized to a fraction of RAM and counts against memory. A build writing large intermediate files there fills it quickly.

Temp files are not cleaned up

Tools that write to /tmp (compilers, packagers, test fixtures) may leave large files behind, accumulating across steps on a reused runner.

How to fix it

Inspect and clear /tmp

See what is filling the temp filesystem and remove stale files.

Terminal
df -h /tmp
du -sh /tmp/* 2>/dev/null | sort -rh | head
rm -rf /tmp/*

Point TMPDIR at a larger disk

Redirect temporary files to a directory on the roomier main disk.

Terminal
export TMPDIR="$RUNNER_TEMP"   # or any path on the large disk
mkdir -p "$TMPDIR"

How to prevent it

  • Set TMPDIR to a path on the large disk for temp-heavy jobs.
  • Clean /tmp between steps on reused runners.
  • Avoid RAM-backed /tmp when builds need large intermediate files.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →