Skip to content

Instantly share code, notes, and snippets.

@joekiller
Last active May 9, 2017 16:40
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 joekiller/866b062bb8bb89b7c3aa940aea467c5a to your computer and use it in GitHub Desktop.
Save joekiller/866b062bb8bb89b7c3aa940aea467c5a to your computer and use it in GitHub Desktop.
Delete docker images volumes and containers
#!/bin/bash
# !!!!DESTRUCTIVE!!!!
# This will delete all local docker images.
CleanDocker () {
docker ps -aq | xargs docker rm
docker images | awk '{print $1":"$2}' | xargs docker rmi
docker volume prune
}
CleanDocker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment