Skip to content

Instantly share code, notes, and snippets.

@tylerbrandt
Created April 13, 2016 18:52
Show Gist options
  • Save tylerbrandt/1ab54fe5139e69b4e2c7e7cdd75a1714 to your computer and use it in GitHub Desktop.
Save tylerbrandt/1ab54fe5139e69b4e2c7e7cdd75a1714 to your computer and use it in GitHub Desktop.
docker-clean
# Docker clean
function docker-clean() {
# http://blog.yohanliyanage.com/2015/05/docker-clean-up-after-yourself/
docker rm -v $(docker ps -a -q -f status=exited)
docker rmi $(docker images -f "dangling=true" -q | tr -s " " | cut -d" " -f 3)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment