Docker: Remove All Untagged Images

Jul 5, 2015 · 41 words · 1 minute read docker

By courtesy of this post, its comment section and this thread:

Clean up old containers

docker ps -a | grep 'Exited' | awk '{print $1}' | xargs --no-run-if-empty docker rm

Remove All Untagged Images

docker rmi $(docker images -q --filter "dangling=true")
tweet Share