AI Diagnostic Summary

Docker 'No Space Left on Device' or Insufficient Disk Space

Well-Documented Error

This error matches known, documented patterns with reliable solutions.

Quick Fix (Most Common Solution)

Seeing "no space left on device"? This error can be frustrating, but it's usually fixable. It typically affects your development workflow or system. Below you'll find clear, step-by-step solutions to resolve this issue.

High confidence
What This Error Means

Docker has exhausted the disk space allocated to its storage driver. On Linux, this consumes real filesystem space in /var/lib/docker. On Mac and Windows, Docker's virtual disk file (.raw or .vmdk) has reached its configured size limit.

Frequently documented in developer and vendor support forums.

Based on documented solutions and common real-world fixes.
Not affiliated with browser, OS, or device manufacturers.

New here? Learn why exact error messages matter →

Common Causes
  • Stopped containers accumulate and consume disk space over time
  • Unused images (dangling and untagged) build up with each docker build
  • Build cache grows significantly with repeated docker build runs
  • Docker's virtual disk file on Mac/Windows has reached its configured size limit
How to Fix
  1. Check what is consuming space: docker system df
  2. Safe prune — removes stopped containers, unused networks, and dangling images: docker system prune
  3. More aggressive prune — also removes unused volumes (data loss if volumes contain data): docker system prune --volumes
  4. Remove all unused images including tagged ones: docker image prune -a
  5. On Mac/Windows: increase the disk image size limit in Docker Desktop Settings > Resources

Last reviewed: June 2026 How we review solutions

Didn't fix it? Get a personalised solution

Works with any error — screenshots, terminal output, or device displays

or paste text
Environment-Specific Commands

Linux / macOS / Windows — Incremental Cleanup

  1. docker system df
  2. docker system prune
  3. docker image prune -a
  4. docker system prune --volumes

macOS / Windows — Increase Docker Disk Limit

  1. # Open Docker Desktop
  2. # Go to Settings > Resources > Disk image size
  3. # Drag the slider or enter a larger value
  4. # Click Apply & Restart
Quick Diagnostic Path
  • If docker system df shows large BUILD CACHE Run: docker builder prune to clear only the build cache without touching images
  • If Many images but docker system prune did not help Run: docker image prune -a — this removes ALL unused images, not just dangling ones
  • If Mac/Windows and error persists after pruning Disk file is at its maximum — increase the limit in Docker Desktop > Settings > Resources
  • If Linux and real disk is full Check which partition Docker uses: df -h /var/lib/docker
If This Still Fails, Check
  • On macOS, pruning frees space inside Docker's virtual disk but does not shrink the .raw file itself — only increasing the configured limit and re-pruning helps
  • Named volumes (docker-compose volumes with explicit names) are NOT removed by docker system prune — use docker volume ls and docker volume rm explicitly
  • CI/CD pipelines: add docker system prune -f as a cleanup step between builds to prevent gradual disk exhaustion on CI runners
Check and reclaim Docker disk space
# Step 1: see what is using space
docker system df

# Step 2: safe prune (stopped containers, dangling images, build cache)
docker system prune

# Step 3: if still not enough — remove ALL unused images
docker image prune -a

# Step 4: include volumes if safe to do so
docker system prune --volumes

# Verify space was reclaimed
docker system df

Environment Differences

Why No Space Left On Device Behaves Differently in Docker vs Local Development

No Space Left On Device frequently appears only in Docker environments because containers are isolated from the host system — they cannot use the host's DNS, filesystem mounts, or network interfaces without explicit configuration. The most common Docker-only cause: services communicate by container name (e.g., postgres) on a user-defined network, but the container attempting the connection is on a different network or the default bridge network. On user-defined networks, Docker provides DNS resolution between containers. On the default bridge network (bridge0), it does not. Run docker network ls and docker inspect <container> | grep -i network to verify both containers share a network. A second Docker-specific cause: /etc/hosts entries on the host are not visible inside containers — if you rely on local hostname overrides for development, add them via --add-host in docker run or the extra_hosts key in Compose.

Optional follow-up

Some users ask whether saving fixes for recurring errors would be useful when the same issue appears again.

Was this explanation helpful?

Explanations are based on documented fixes, real-world reports, and common system behavior. GetErrorHelp is independent and not affiliated with software vendors, device manufacturers, or service providers.
Frequently Asked Questions

What does 'docker system prune' remove?

By default it removes: all stopped containers, all unused networks, all dangling images, and the build cache. It does NOT remove named volumes or images that are referenced by a tag.

Will I lose my data?

docker system prune is safe for data in running containers and named volumes. Use --volumes only if you are certain you do not need that volume data.

How do I prevent this from happening again?

Run 'docker system prune -f' regularly in a cron job, or add it as a cleanup step in your CI/CD pipeline after each build.

Related Resources

Also Known As

Common Search Variations

Related Errors
Still Stuck?

Paste a different error message or upload a screenshot to get help instantly.

Solutions are based on commonly documented fixes and may not apply in all situations.