Skip to content

Instantly share code, notes, and snippets.

@junejie
Created April 6, 2018 02:46
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 junejie/4cf63ff0055f57fd1841b1c1d85a936e to your computer and use it in GitHub Desktop.
Save junejie/4cf63ff0055f57fd1841b1c1d85a936e to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
docker volume rm $(docker volume ls -qf dangling=true)
docker rmi $(docker images --filter "dangling=true" -q --no-trunc)
docker rmi $(docker images | grep "none" | awk '/ / { print $3 }')
docker rm $(docker ps -qa --no-trunc --filter "status=exited")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment