Skip to content

Instantly share code, notes, and snippets.

@xmeng1
Forked from daredude/docker-clear.bat
Created June 3, 2018 17:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xmeng1/fc8e629f0392ef7eb5a3051357b5354b to your computer and use it in GitHub Desktop.
Save xmeng1/fc8e629f0392ef7eb5a3051357b5354b to your computer and use it in GitHub Desktop.
delete all docker container and images on windows
@echo off
FOR /f "tokens=*" %%i IN ('docker ps -aq') DO docker rm %%i
FOR /f "tokens=*" %%i IN ('docker images --format "{{.ID}}"') DO docker rmi %%i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment