Skip to content
Latchkey

GitHub Actions runner disk full "No space left on device"

The runner ran out of disk space mid-job, so any further write, extract, or cache operation fails with ENOSPC even though your commands are correct.

What this error means

A step fails with "No space left on device" (ENOSPC), often during dependency install, Docker build, artifact upload, or cache extraction.

github-actions
tar: write error: No space left on device
Error: Process completed with exit code 2.

Common causes

Large build/Docker artifacts fill the disk

Big images, node_modules, build outputs, or layers exceed the runner's available disk during the job.

Accumulated caches and temp files

Caches, downloads, and temp data accumulate within the job and exhaust free space.

How to fix it

Free space and reduce footprint

  1. Prune Docker between steps (docker system prune -af).
  2. Remove unneeded preinstalled tooling to reclaim space.
  3. Avoid writing huge intermediates to the working directory.
  4. Split disk-heavy work across jobs.
.github/workflows/ci.yml
- run: docker system prune -af && df -h

Use right-sized managed runners

Latchkey managed runners offer right-sized disk and auto-retry transient infrastructure failures, so disk-bound jobs are not starved on an undersized host, at roughly 70% less than GitHub-hosted runners.

How to prevent it

  • Track peak disk usage on heavy jobs.
  • Prune images and intermediates within the job.
  • Size runner disk to the workload.

Frequently asked questions

What causes ""No space left on device""?
Big images, node_modules, build outputs, or layers exceed the runner's available disk during the job.
How do I fix "No space left on device"?
Free space and reduce footprint

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card