GitHub Actions "No space left on device" during a job
A build wrote more data than the runner disk holds (large Docker images, build artifacts, or caches), and a step failed with ENOSPC. On Latchkey managed runners, transient disk-pressure failures from ephemeral fills are auto-retried on a fresh instance, but a build that genuinely needs more space must be slimmed or moved to a larger runner.
What this error means
A step fails partway through with "No space left on device" while writing files or pulling images.
github-actions
write /home/runner/work/app/app/dist/bundle.js: no space left on device
##[error]Process completed with exit code 1.Common causes
Large images or artifacts fill the disk
Pulling several big Docker images plus build output exceeds the runner volume.
Unbounded caches or logs accumulate
Caches, node_modules variants, or verbose logs grow until the disk is full.
How to fix it
Free space or use a larger runner
- Add a step that prunes Docker and removes unused preinstalled tooling to reclaim space.
- Trim caches and clean build intermediates between stages.
- If the build legitimately needs more disk, select a larger runner.
.github/workflows/ci.yml
- name: Free disk space
run: |
docker system prune -af
sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android
- run: df -hHow to prevent it
- Prune images and clean intermediates for disk-heavy builds.
- Pick a larger runner when builds consistently approach the disk limit.
Related guides
GitHub Actions container job killed with OOMKilledFix the GitHub Actions error where a container job process is OOMKilled because it exceeded the memory availa…
GitHub Actions "Post job cleanup failed"Fix the GitHub Actions error where an action's post step (cache save, checkout cleanup) fails after the job's…
GitHub Actions "RUNNER_TEMP is not writable"Fix the GitHub Actions error where steps or actions fail because the RUNNER_TEMP directory is read-only or ow…