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.
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.
- 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.