Created
December 7, 2016 11:13
-
-
Save chrisloy/4256f5d97e397161f06481b52c57cd47 to your computer and use it in GitHub Desktop.
Removes all images and temporary files from Docker (Mac)
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 | |
read -r -p "Are you sure? [y/N] " response | |
case $response in | |
[yY][eE][sS]|[yY]) | |
echo "Burning the world...." | |
docker rm $(docker ps -a -q) | |
docker rmi -f $(docker images -q) | |
rm -rf ~/Library/Containers/com.docker.docker/Data/* | |
;; | |
*) | |
echo "Stand down, gentlemen" | |
;; | |
esac | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment