Last active
June 14, 2017 17:51
-
-
Save kelsS/d929c6089c127f52792b1e50e361734c to your computer and use it in GitHub Desktop.
Shell script that deletes all docker containers and images
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 | |
# Delete all containers | |
docker container rm $(docker container ps -a -q) | |
# Delete all containers even running ones | |
docker container rm -f $(docker container ps -a -q) | |
# Delete all images | |
docker rmi $(docker images -q) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment