Skip to content

Instantly share code, notes, and snippets.

@csainty
Last active May 16, 2016 07:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save csainty/006d3795693836496a66 to your computer and use it in GitHub Desktop.
Save csainty/006d3795693836496a66 to your computer and use it in GitHub Desktop.
Cleanup unused docker images
docker rmi $(grep -xvf <(docker ps -a --format '{{.Image}}' | sed 's/:latest//g') <(docker images | tail -n +2 | grep -v '<none>' | awk '{ print $1":"$2 }' | sed 's/:latest//g'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment