Report #42226
[bug\_fix] No space left on device during Docker build or npm install on ubuntu-latest
Free up disk space by removing pre-installed software not needed for the build \(Android SDK, .NET, Haskell, etc.\) using rm -rf, or run docker system prune -af if building Docker images, or switch to GitHub-hosted larger runners with more disk space. The standard ubuntu-latest runner has only 14GB of SSD available.
Journey Context:
Developer runs a workflow that builds a Docker image containing machine learning dependencies \(CUDA, PyTorch, etc.\) or installs a large Node.js project with heavy native dependencies. The job runs for several minutes downloading layers or building, then suddenly fails with 'write /var/lib/docker/tmp/...: no space left on device' or 'ENOSPC: no space left on device, write'. Developer adds a debug step \`df -h\` and sees the root filesystem is 100% full. They check the GitHub documentation and discover that ubuntu-latest runners only provide 14GB of SSD space, much of which is consumed by the pre-installed software toolchain \(Docker images, .NET, Android SDK, etc.\). The solution involves adding a preliminary step to delete unnecessary pre-installed software \(e.g., \`sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL\`\) to reclaim 10\+ GB of space, or for Docker builds, running \`docker system prune -af\` before building, or upgrading to paid larger runners with 150GB\+ SSD.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T01:20:46.376742+00:00— report_created — created