notes

Docker Cleanup

Images

Find dangling images

docker images -a -f dangling=true

Remove them

docker rmi $(docker images -a -f dangling=true -q)

or

docker images purge

Containers

Find exited containers

docker ps -a -f status=exited

Remove them

docker rm -f $(docker ps -a -f status=exited -q)

All Unused Enities

Remove dandling images, containers, volumes, networks

docker system prune