Skip to content

Instantly share code, notes, and snippets.

@gurunars
Created April 20, 2017 13:41
Show Gist options
  • Save gurunars/520c020e4e3fee9bb91ce196d301771d to your computer and use it in GitHub Desktop.
Save gurunars/520c020e4e3fee9bb91ce196d301771d to your computer and use it in GitHub Desktop.
cleanup-docker
#!/bin/bash
docker ps -aqf "status=exited" | xargs -r docker rm -f
docker images -qf "dangling=true" | xargs -r docker rmi -f
docker volume ls -qf "dangling=true" | xargs -r docker volume rm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment