Last active
May 9, 2017 16:40
-
-
Save joekiller/866b062bb8bb89b7c3aa940aea467c5a to your computer and use it in GitHub Desktop.
Delete docker images volumes and containers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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