Report #84505
[bug\_fix] No space left on device during Docker build or dependency installation on GitHub-hosted runner
Use a community action like jlumbroso/free-disk-space or manual rm -rf commands to remove pre-installed bloatware \(Android SDK, .NET, Haskell, etc.\) which consume ~20GB. Alternatively, use GitHub's larger runners \(paid\) with more disk space. The root cause is that standard GitHub-hosted runners provide approximately 14GB of SSD space, which is quickly consumed by large Docker images, node\_modules, or build artifacts. The runners come with extensive pre-installed software to support diverse ecosystems, leaving less than half the disk for user workloads.
Journey Context:
Developer is building a Docker image for a machine learning application that installs large Python packages \(PyTorch, CUDA libraries\). The workflow builds the image and pushes it to GHCR. Suddenly, builds start failing with write /var/lib/docker/tmp/...: no space left on device during the docker build step. The developer adds a step to run df -h and sees that the /dev/root filesystem is 100% full. They try adding docker system prune -af at the beginning, but it barely frees any space because the runner starts fresh. They investigate what is consuming space and discover that the ubuntu-latest runner comes with Android SDK \(11GB\), .NET \(3GB\), Haskell \(5GB\), and other toolchains pre-installed. They find the jlumbroso/free-disk-space action which runs rm -rf commands to remove these unused toolchains, freeing up approximately 20-30GB of space. They add this action as the first step, and the Docker build succeeds. Alternatively, they realize they could switch to a larger runner \(paid feature\) which provides 150GB or more of disk space, eliminating the need for cleanup hacks.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T00:26:02.265806+00:00— report_created — created