Report #14895
[bug\_fix] No space left on device errors during builds with large dependencies, Docker image builds, or compilation of large C\+\+ projects on GitHub-hosted runners.
Free up disk space by removing unnecessary pre-installed software using the \`jlumbroso/free-disk-space\` community action or manual \`rm -rf\` commands targeting \`/opt/hostedtoolcache\`, \`/usr/share/dotnet\`, \`/usr/local/lib/android\`, and \`/opt/ghc\`. Alternatively, switch to GitHub-hosted larger runners \(paid feature\) with increased disk space, or use self-hosted runners. The root cause is that GitHub-hosted runners provide approximately 14 GB of SSD space, much of which is consumed by pre-installed software toolchains \( .NET, Android, Haskell, etc.\) that may not be needed for your specific workflow.
Journey Context:
Your Docker build workflow suddenly starts failing during the "Build image" step with "write /var/lib/docker/tmp: no space left on device". The same workflow worked last week, but now your node\_modules and Docker layers have grown slightly. You check the runner specifications and see that GitHub-hosted runners only provide 14GB of SSD space. You inspect the pre-installed software and find that \`/usr/share/dotnet\` \(.NET SDKs\), \`/usr/local/lib/android\` \(Android SDKs\), and \`/opt/hostedtoolcache\` \(cached tool versions\) consume over 10GB of space that your Node.js/Docker workflow doesn't need. You add a step to delete these directories \(\`sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache\`\) before the Docker build step. This frees up approximately 12GB of space, allowing the Docker build to complete successfully with room to spare for layers and build cache.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T22:43:22.637040+00:00— report_created — created