Docker Community Forums

Share and learn in the Docker community.

Is Docker System Prune safe to be used on a Production machine?


#1

Hi! We have a Virtual Machine with Docker installed and we have some containers/images/volumes. We are running Jenkins and Rancher as well.

We have been problems with disk space and we just noticed that the docker folder is taking almost all the disk space.

By doing

docker ps
docker images
docker volume ls

everything seems to be okay. I can’t see anything that shouldn’t be there.

After running docker system df, it shows:

Images - Size 3.358GB (Reclaimable 28%)
Containers- Size 46.66MB (Reclaimable 0%)
Local Volumes- Size 44.32MB (Reclaimable 0%)

There is only 28% fo reclaimable disk space. We can also see that Images, Containers and Volumes are taking up to around 3.5GB.

However, when I do sudo du --max-depth=1 -h | sudo sort -n -r | sudo head -n 20 on /var/lib/docker

docker%20space

we can see that ./aufs is taking 8.7GB.

Is it secure to do docker system prune? Will this command free some space from that ./aufs folder?
Will that command remove, for example, meltwater/docker-cleanup container/image?

And another question, which I don’t know if it’s related to Docker: there is an export folder on the root of the machine. Is it related to Docker whatsoever?

Thanks a lot for the help.