Skip to content

Instantly share code, notes, and snippets.

@ekristen
Created January 29, 2014 20:25
Show Gist options
  • Save ekristen/8696240 to your computer and use it in GitHub Desktop.
Save ekristen/8696240 to your computer and use it in GitHub Desktop.
useful docker cleanup commands
docker ps -a | grep "Exit" | awk '{print $1}' | xargs -I{} docker stop {}
docker ps -a | grep "Exit" | awk '{print $1}' | xargs -I{} docker kill {}
docker ps -a | grep "Exit" | awk '{print $1}' | xargs -I{} docker rm {}
docker images | grep "<none>" | awk '{print $3}' | xargs docker rmi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment