Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
docker cleanup
# remove containers which have exited
docker ps -a | awk '/Exited[ ]\(/ {print $1}' | xargs docker rm
# remove images without tag nor repo
docker images | awk '/^<none>[[:space:]]*<none>/ {print $3}' | xargs docker rmi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment