Last active
March 18, 2020 12:50
-
-
Save assafmo/8527098db480ceb822211b64abbb84b1 to your computer and use it in GitHub Desktop.
Purge 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 | |
docker ps -a | | |
tail -n +2 | | |
awk '{print $1}' | | |
xargs -r docker rm -f | |
docker images | | |
tail -n +2 | | |
awk '{print $3}' | | |
xargs -r docker rmi -f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment