Last active
February 9, 2022 14:45
-
-
Save KleaTech/bba7da880731a45f542700ed850e73a0 to your computer and use it in GitHub Desktop.
Remove all docker images, containers on Windows (one liner)
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
From command line: | |
FOR /f "tokens=*" %i IN ('docker ps -aq') DO docker rm -f %i | |
FOR /f "tokens=*" %i IN ('docker images --format "{{.ID}}"') DO docker rmi -f %i | |
docker builder prune -a | |
From batch file: | |
FOR /f "tokens=*" %%i IN ('docker ps -aq') DO docker rm -f %%i | |
FOR /f "tokens=*" %%i IN ('docker images --format "{{.ID}}"') DO docker rmi -f %%i | |
docker builder prune -a | |
source: https://gist.github.com/daredude/045910c5a715c02a3d06362830d045b6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment