# Error response from daemon: write /var/lib/docker/overlay2/.../merged: no space left on device

- **ID:** `docker/overlay2-disk-full`
- **Domain:** docker
- **Category:** resource_error
- **Verification:** ai_generated
- **Fix Rate:** 85%

## Root Cause

The filesystem where Docker stores overlay2 layers (usually /var/lib/docker) has run out of disk space.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Docker 24.0.6 | active | — | — |
| Docker 25.0.0 | active | — | — |
| Docker 20.10.24 | active | — | — |

## Workarounds

1. **Free up space: run 'docker system prune -a --volumes' to remove all unused images, containers, and volumes. Then check disk usage with 'df -h /var/lib/docker'.** (85% success)
   ```
   Free up space: run 'docker system prune -a --volumes' to remove all unused images, containers, and volumes. Then check disk usage with 'df -h /var/lib/docker'.
   ```
2. **Increase disk space by adding a new storage device and moving Docker's data directory: edit /etc/docker/daemon.json with 'data-root': '/new/path', then restart Docker.** (90% success)
   ```
   Increase disk space by adding a new storage device and moving Docker's data directory: edit /etc/docker/daemon.json with 'data-root': '/new/path', then restart Docker.
   ```

## Dead Ends

- **** — Running 'docker system prune' only removes unused containers and images, but may not free enough space if the volume is too small. (70% fail)
- **** — Restarting the Docker daemon does not free disk space; it only clears temporary locks. (95% fail)
