Skip to content

Instantly share code, notes, and snippets.

@bastman
Last active March 30, 2016 06:15
Show Gist options
  • Save bastman/da9d878151bd4af5b746 to your computer and use it in GitHub Desktop.
Save bastman/da9d878151bd4af5b746 to your computer and use it in GitHub Desktop.
remove_docker_images
docker rmi $(docker images | grep "foo" | awk '/ / { print $3 }')
docker rmi $(docker images --filter "dangling=true" -q --no-trunc)
docker rm $(docker ps -qa --no-trunc --filter "status=exited")
and: http://stackoverflow.com/questions/32723111/how-to-remove-old-and-unused-docker-images
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment