GitLab CI "no space left on device": free up runner disk space
Short answer
"no space left on device" means the disk the job runs on is full. On GitLab.com, each hosted runner job gets a fresh VM with 30 GB of storage on the default small runner, 50 GB on medium and more on larger ones, so the job itself filled it: big images, Docker-in-Docker layers, dependencies, build output or artifacts. Use less, or tag a bigger runner. On your own Docker runners, images, stopped containers and cache volumes pile up on the host: run the runner's clear-docker-cache script, weekly from cron, and docker image prune -a for images. Shell runners keep every project's checkout and cache under the runner user's home. On Kubernetes, the node runs out of ephemeral storage and evicts the pod.
A job fails partway through with a write error:
write /builds/group/project/dist/app.js: no space left on device
The same text shows up in image pulls, Docker builds and cache extraction. Whatever the step, the disk the job runs on is full. Which disk, and how to free it, depends on the runner. Here’s how it works with GitLab 19.5.
Which disk is full
| Runner | Whose disk | Fix |
|---|---|---|
| GitLab.com hosted | The job’s own VM, fresh for each job | Use less space, or a bigger runner |
| Your own, Docker executor | The host’s Docker storage, shared by every job | Prune containers, volumes and images |
| Your own, shell executor | The runner user’s home folder | Delete old checkouts and caches |
| Kubernetes | The node’s ephemeral storage | Request storage, use bigger nodes |
To see how full it is, add df -h to the job’s script, before the step that fails. On a Docker host, docker system df shows what Docker uses.
On GitLab.com’s hosted runners
Each job starts on a new VM, so nothing piles up between jobs: this job filled the disk itself. Storage depends on the runner:
| Runner tag | Storage |
|---|---|
saas-linux-small-amd64 (default), saas-linux-small-arm64 |
30 GB |
saas-linux-medium-amd64, saas-linux-medium-arm64 |
50 GB |
saas-linux-large-amd64, saas-linux-large-arm64 |
100 GB |
saas-linux-xlarge-amd64, saas-linux-2xlarge-amd64 |
200 GB |
Large and bigger runners, and medium on Arm64, need Premium or Ultimate. Bigger runners use compute minutes faster: see GitLab compute minutes.
To use less:
- Pick smaller images, such as
-slimor-alpinetags, for the job and its services. - Download only the artifacts you need:
dependencies: []orneedswithartifacts: falseskips the rest. See GitLab CI artifacts. - Clean up between heavy steps, such as deleting build intermediates, or images in a Docker-in-Docker job with
docker image prune -af. - Split the job, so each part needs less at once.
On your own Docker runners
The Docker executor keeps what it creates on the host: pulled images, stopped containers, and volumes for each project’s cache. Over weeks, they fill the disk, and every job on the host starts failing. GitLab Runner’s packages install a cleanup script, which isn’t on the PATH:
sudo /usr/share/gitlab-runner/clear-docker-cache space
sudo /usr/share/gitlab-runner/clear-docker-cache
The first shows what can be reclaimed; the second removes unused containers, networks and volumes. It doesn’t remove the images your jobs pull. For those:
docker system prune # unused containers, networks, dangling images and build cache
docker image prune -a # every image no container uses
Run cleanup on a schedule, such as weekly with cron, at a time no jobs run. Pruning images means the next jobs pull them again, which counts against Docker Hub’s limits: see GitLab CI and Docker Hub rate limits.
On your own shell runners
The shell executor keeps a checkout for each project, and for each job that ran at the same time, under its working directory, the runner user’s home by default:
/home/gitlab-runner/builds/<short-token>/<concurrent-id>/<namespace>/<project>
/home/gitlab-runner/cache/
Delete the folders of old projects while no jobs run, or move builds_dir and cache_dir in the runner’s [[runners]] section of config.toml to a bigger disk.
On Kubernetes
When a node runs low on ephemeral storage, the disk pods use for their files and logs, the kubelet evicts pods with the reason Evicted and a message such as The node was low on resource: ephemeral-storage., and the job fails. Set ephemeral_storage_request, and ephemeral_storage_limit if you want a cap, in the runner’s [runners.kubernetes] section, so pods land only on nodes with room. Those cover the build container; helper_ and service_ versions cover the others. And give the nodes bigger disks.
On your phone
MergeBell shows a job’s log live, so the no space left on device line is there as soon as the runner writes it, and Retry reruns the job on the free tier. Once the runner’s disk is cleaned up, a retry works with no new commit; on GitLab.com, a smaller image or a bigger runner tag in .gitlab-ci.yml needs a new commit. More in how to retry a failed GitLab pipeline.
Frequently asked questions
Why does my GitLab CI job fail with "no space left on device"?
The disk the job runs on is full. On GitLab.com's hosted runners, each job gets a fresh VM, so the job filled it itself: the default small runner has 30 GB. On your own runners, old images, containers, cache volumes and checkouts pile up on the host between jobs until it fills.
How much disk space do GitLab.com hosted runners have?
On Linux, saas-linux-small has 30 GB, medium 50 GB, large 100 GB, and xlarge and 2xlarge 200 GB, for both amd64 and Arm64 where they exist. Large and bigger, and medium on Arm64, need Premium or Ultimate, and bigger runners use compute minutes faster.
How do I clean up disk space on a GitLab runner that uses Docker?
Run /usr/share/gitlab-runner/clear-docker-cache, which GitLab Runner's packages install, to remove unused containers, networks and volumes; add space to see what can be reclaimed first. It doesn't remove the images your jobs pull, so also run docker image prune -a, which removes every image no container uses. Schedule both with cron, for example weekly.
Where does a GitLab shell runner store builds and caches?
Under its working directory, by default the runner user's home, such as /home/gitlab-runner/builds and /home/gitlab-runner/cache. Each project, and each concurrent job slot, keeps its own checkout there. Delete old projects' folders while no jobs run, or set builds_dir and cache_dir in config.toml to a bigger disk.
Why are GitLab jobs on Kubernetes evicted for ephemeral storage?
The node ran low on ephemeral storage, the disk pods use for their files and logs, so the kubelet evicted pods, and the job fails. Set ephemeral_storage_request and ephemeral_storage_limit in the runner's [runners.kubernetes] section, and their helper_ and service_ versions for the other containers, so pods land on nodes with room, and give the nodes bigger disks.
Sources
- GitLab docs — Hosted runners on Linux (machine types and storage)
- GitLab Runner docs — Clear the Docker cache
- GitLab Runner docs — Shell executor build directories
- GitLab Runner docs — Kubernetes executor settings (ephemeral storage)
- Docker docs — docker system prune
Checked against these pages on 14 November 2026. GitLab changes quickly — if something here no longer matches, tell us and we will fix it.
Do this from your phone with MergeBell
Free for the whole review loop: the To-Do inbox, diffs and line comments, approve and merge, pipelines with retry, and push alerts for your To-Dos. Works with gitlab.com and self-managed GitLab 16.0+.
Get MergeBell for iPhoneGet MergeBell for Android
On the App Store for iOS 26 or later and on Google Play for Android 12 or later. An independent app, not affiliated with GitLab Inc.