Clean up excessive docker usage
Ran into an issue today where the
/var/lib/docker folder had grown to a full 45gb of size. After some futher inspection, it turned out to be the
overlay2 and the
volumes folder that were large.
Since this was a CI server (a server that runs build pipelines), no data needed to be persisted there. This allowed me to clean it up using the following commands:
docker system prune -a -f cleaned out the
docker volume rm $(docker volume ls -qf dangling=true) cleaned out the
After this, the
/var/lib/docker folder was only 3mb large.