Fixing Docker No Space Left on Device Errors
docker system prune to instantly remove stopped containers, unused networks, dangling images, and build caches. This frees up blocked storage when you encounter a docker no space left on device error. The physical storage on your host machine has likely run out of disk blocks or inodes. Accumulation occurs due to containers, images, and log files inside /var/lib/docker.How to solve no space left on device
To solve the docker no space left on device error, a diagnostic approach starting with docker system df is used. This identifies storage consumption followed by targeted pruning commands. You must diagnose whether the host machine faces actual physical block exhaustion or metadata exhaustion before executing destructive cleanup tasks.

When your filesystem hits its limit, running commands blindly risks deleting active volumes or deployment artifacts. You need to inspect your exact resource bottlenecks using native Docker and Linux monitoring utilities.
What does no space left on device mean
The docker no space left on device error indicates that physical disk storage has reached 100 percent capacity. Alternatively, the filesystem has run out of available inodes to track new files and directories. Applications creating millions of small files, such as PHP session data or deep node_modules trees, consume inodes rapidly. This happens even when raw megabytes remain available.

You can check host inode utilization by running df -i in your terminal. If the use percentage for /var/lib/docker or your root partition sits at 100 percent, no new files can be written regardless of free gigabytes.
How to Identify What Filled the Disk
Run docker system df -v to view a detailed breakdown of space used by your local volumes, build caches, containers, and images. This command maps exact storage weights so you know precisely which components consume your partition.
For a broader view of the host machine, run df -h alongside df -i. These tools isolate whether the bottleneck resides inside the primary storage blocks or the metadata inode tables.
How to Clean Up Safely
Execute targeted cleanup commands instead of aggressive blanket deletions to prevent accidental data loss across your container environments. Follow these sequential steps to reclaim space safely:

- Run
docker system dfto inspect current space usage across images, containers, and volumes. You should see a table outlining allocated storage. [docs.docker.com] - Run
docker system pruneto clear stopped containers and dangling build caches. Confirm the prompt by typingywhen the terminal asks for confirmation. - Run
docker image prune -aif you need to remove unused images. These images must not be associated with any currently existing container.
Docker no space left on device Mac
On macOS, the docker no space left on device mac issue typically stems from a fixed virtual disk limit assigned to the underlying Linux virtual machine managed by Docker Desktop. You can resolve this by opening Docker Desktop settings, navigating to resources, and increasing the virtual disk limit slider before applying the changes.
No space left on device inside docker container
When you encounter a no space left on device inside docker container scenario, the writable container layer has exhausted its allocated size limit or the host volume backing the container is full. You can inspect container disk consumption using docker ps -s, which lists the size of data written to each container’s writable layer.

Related guides
Frequently asked questions
Is docker still used in 2026
Yes, Docker remains widely used across the software industry for local development, image building, and continuous integration pipelines. Alternative runtimes handle production workloads in Kubernetes.
How do I prevent Docker logs from filling the disk
You can configure log rotation limits inside /etc/docker/daemon.json using the max-size and max-file parameters. These settings ensure container log files do not grow unbounded.
Is it safe to run docker system prune minus a
Running docker system prune -a removes all unused images, not just dangling ones. Operations teams must ensure they do not delete images needed for upcoming offline deployments.