Skip to content

Instantly share code, notes, and snippets.

@josephsiefers
Created January 12, 2016 20:51
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 josephsiefers/72df7bf9449de8e74214 to your computer and use it in GitHub Desktop.
Save josephsiefers/72df7bf9449de8e74214 to your computer and use it in GitHub Desktop.
Clean Unused Docker Containers and Images
#date >> /tmp/MyLaunchdTest.out
docker ps -a | grep 'Exited' | awk '{print $1}' | xargs 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