I've just noticed that I ran out of disk space on my laptop. Quite a lot is used by Docker as found by mate-disk-usage-analyzer
:
The docker/aufs/diff
folder contains 152 folders ending in -removing
.
I already ran the following commands to clean up
Kill all running containers: # docker kill $(docker ps -q) Delete all stopped containers # docker rm $(docker ps -a -q) Delete all images # docker rmi $(docker images -q) Remove unused data # docker system prune And some more # docker system prune -af
But the screenshot was taken after I executed those commands.
What is docker/aufs/diff
, why does it consume that much space and how do I clean it up?
I have Docker version 17.06.1-ce, build 874a737. It happened after a cleanup, so this is definitely still a problem.
Volumes are removed using the docker volume rm command. You can also use the docker volume prune command.
The following is a radical solution. IT DELETES ALL YOUR DOCKER STUFF. INCLUDING VOLUMES.
$ sudo su # service docker stop # cd /var/lib/docker # rm -rf * # service docker start
See https://github.com/moby/moby/issues/22207#issuecomment-295754078 for details
The docker location might be different in your case. You can use a disk usage analyzer (such as mate-disk-usage-analyzer
) to find the folders which need most space.
See Where are Docker images stored on the host machine?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With