Skip to content
Latchkey

CI "No space left on device" (ENOSPC) on the Runner

A write failed with ENOSPC because the runner filesystem is full. The error comes from the kernel, so it can surface from any step that writes: a download, an extract, a compile, or an artifact upload.

What this error means

A step fails mid-write with No space left on device. It often appears while extracting an archive, writing a build output, or uploading an artifact. Re-running on a fresh runner usually passes with no code change.

shell
cp: error writing '/home/runner/work/app/dist/bundle.js': No space left on device
##[error] Process completed with exit code 1.

Common causes

Accumulated caches, layers, and artifacts

On a reused or long-lived runner, dependency caches, container layers, and old artifacts pile up across jobs until the disk fills.

A single job writes more than the disk holds

Large checkouts, generated assets, or build outputs can exhaust a small runner disk within one job, even on a clean runner.

How to fix it

See where the space went, then reclaim it

Check free space and the biggest consumers, then prune. On a CI runner this is safe because the next job starts fresh.

shell
df -h
du -xh / 2>/dev/null | sort -rh | head -20
docker system prune --all --force --volumes

Write less per job, or use a bigger disk

  1. Use a shallow clone (fetch-depth: 1) so the checkout is smaller.
  2. Stream or clean up large downloads instead of keeping them on disk.
  3. Move image- or dataset-heavy jobs to runners with bigger disks.

How to prevent it

  • Add a prune step at the start of jobs on long-lived runners.
  • Monitor df -h in CI to catch creeping disk usage early.
  • Use larger-disk runners for image- or data-heavy pipelines.

Frequently asked questions

What causes "ENOSPC in CI"?
On a reused or long-lived runner, dependency caches, container layers, and old artifacts pile up across jobs until the disk fills.
How do I fix ENOSPC in CI?
Check free space and the biggest consumers, then prune. On a CI runner this is safe because the next job starts fresh.
Can Latchkey fix this automatically?
Yes. Latchkey runs your GitHub Actions on managed runners that detect this failure, apply the fix, and retry the job automatically - self-healing is on by default.

Related guides

References

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