Skip to content
Latchkey

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

  1. Add a step that prunes Docker and removes unused preinstalled tooling to reclaim space.
  2. Trim caches and clean build intermediates between stages.
  3. 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 -h

How 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

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →