# GitHub Actions: System.IO.IOException: No space left on device — the runner's disk is full

**Code:** `No space left on device (runner)` · **Category:** CI/CD · **Seen on:** GitHub Actions, Docker, Linux

The job filled the runner's disk (about 14 GB free on standard Linux runners): large Docker images, caches, build outputs or test artifacts.

## Meaning

Hosted runners have limited free disk. Docker builds, Android/Gradle, Rust `target/` folders and big node_modules can fill it. Free space early by removing preinstalled tools you do not use, prune Docker, avoid huge artifacts, and clean build output between steps.

## Common causes

- Large Docker images and layers
- Rust `target/`, Gradle caches or node_modules growing large
- Many or huge artifacts/logs written to the workspace
- Preinstalled SDKs consuming space you do not need
- Matrix legs sharing a self-hosted disk

## Quick fix

1. Delete unused preinstalled tools at the start (dotnet, android, haskell)
2. `docker system prune -af` between big steps
3. Upload less data; compress or exclude build intermediates

## Detailed fix by platform

### GitHub Actions

1. Check usage: `run: df -h /` and `du -sh * | sort -h | tail`
2. Free ~25 GB: `sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc`

### Docker

1. `docker system df` then `docker system prune -af --volumes`

## Code examples

### Free space first

```yaml
- name: Free disk space
  run: |
    df -h /
    sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc
    docker system prune -af
    df -h /
```

## How to diagnose

1. **Usage** — df -h / at the point of failure?
2. **Biggest** — du -sh of folders?
3. **Cause** — Docker, caches or artifacts?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/cicd/gha-no-space-left-on-device)
