Created
April 4, 2018 17:53
-
-
Save wdmtech/f5fd27d9152f07da2295f7f639e58006 to your computer and use it in GitHub Desktop.
How to remove all the crud Docker leaves behind
This file contains 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
### To remove all containers | |
docker rm -f $(docker ps -aq) | |
### To remove all volumes | |
docker volume rm $(docker volume ls -q) | |
### To remove all images | |
docker rmi -f $(docker images -a -q) | |
### Combined above 3 commands | |
docker rm -f $(docker ps -aq); docker volume rm $(docker volume ls -q); docker rmi -f $(docker images -a -q) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment