Reputation: 143
I am trying to figure out how I can reclaim some of my disk space from Docker. My /var/lib/docker directory currently looks like:
42M containers
3.6G devicemapper
14M image
68K network
20K plugins
4.0K swarm
4.0K tmp
4.0K trust
9.0G vfs
28K volumes
I dont know why my vfs directory is so huge nor how to clean it up! My newer installations of docker on other servers dont even have this directory, so is it safe to delete?
I am running docker 1.13.1, using the devicemapper storage driver on an Ubuntu 14.04 server. This docker has been upgraded several times in the past. I am only running 3 containers on it and most of the important volumes are mounted to the host.
I've run "docker system prune" but it reclaims nothing. I've also cleaned out all the images I dont need.
Upvotes: 9
Views: 14997
Reputation: 181
After docker system prune -a --volumes
and checking with docker system df
and docker container ls -a
that nothing is running I have simply deleted vfs directories: rm - r vfs/dir/3213412.../
.
If you look into these folders you'll realize that these are basically the containers' runtime files. I don't know why these are still there once the whole system was pruned... but I simply got rid of them and won back 10 G.
Upvotes: 10