Report #11625
[bug\_fix] Runner runs out of disk space during Docker builds or large dependency installations
Remove unnecessary pre-installed software using the \`rm -rf\` command on directories like \`/opt/hostedtoolcache\`, \`/usr/share/dotnet\`, \`/usr/local/lib/android\`, \`/opt/ghc\`, or use the community action \`jlumbroso/free-disk-space\`. Alternatively, use self-hosted runners with larger disks. Root cause: GitHub-hosted \`ubuntu-latest\` runners have only ~14-20GB of free disk space available after accounting for the ~90GB of pre-installed software \(Visual Studio, .NET SDKs, Android SDK, Haskell, etc.\). Docker image layers, build caches, and \`node\_modules\` quickly exhaust this remaining space.
Journey Context:
Your workflow builds a multi-stage Docker image for a Node.js application. During the \`npm ci\` step inside the Dockerfile, the build fails with "No space left on device" when extracting large tarballs. You check the runner specifications and see \`ubuntu-latest\` is supposed to have an SSD. You add a debug step \`df -h\` before the build and see \`/dev/sda1\` is 100% full with only 14GB total. You investigate what's consuming space and discover \`/usr/share/dotnet\` consumes 5GB, \`/usr/local/lib/android/sdk\` consumes 10GB, and \`/opt/hostedtoolcache\` contains multiple versions of Node, Python, and Go taking another 10GB\+. You add a step to delete these unused toolchains: \`sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /opt/hostedtoolcache\`. The available space jumps to 40GB\+ and your Docker build completes successfully. You later discover the \`jlumbroso/free-disk-space\` community action that automates this cleanup.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T13:48:00.132905+00:00— report_created — created