Skip to content
Latchkey

"No Space Left on Device" on CircleCI - Causes and Fixes

"No Space Left on Device" is an infrastructure failure, not a bug in your code - here is the CircleCI-specific fix.

What this error means

A job fails mid-run with no space left on device, usually while writing a file, extracting a layer, or caching. The runner disk filled up.

CircleCI log
write /var/lib/...: no space left on device

Common causes

Accumulated Docker layers and caches

Image layers, build cache, and temp files build up and exhaust the disk, especially on reused runners.

A small runner disk

Default runners ship with limited free disk; a build that needs more transient space fails.

How to fix it

Reclaim space on CircleCI

Use a larger resource_class (more disk) and clean Docker layers between steps.

Write less

Use multi-stage Docker builds, a .dockerignore, and clean package caches in the same step.

How to prevent it

  • Right-size CircleCI runners/agents for the job.
  • Cache dependencies to cut time, memory pressure, and network calls.
  • Use self-healing runners that retry transient and mechanical failures automatically.

Frequently asked questions

What causes "No space left on CircleCI"?
Image layers, build cache, and temp files build up and exhaust the disk, especially on reused runners.
How do I fix No space left on CircleCI?
Use a larger resource_class (more disk) and clean Docker layers between steps.
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