There are a plenty of Shell Commands on how to delete all docker images in single command.

But really hard to find command for Windows.

Thanks to mastroiannim the contributor in This Gist.


docker images -aq | foreach {docker rmi $_ -f}

How it works?

It combines of two commands.

docker images -aq

This command returns ID(s) of all images one ID per line. And we combine with below command to loop throught each line and using Docker Image ID as argument.

foreach {docker rmi $_ -f}

So, we run both two command in the single line.

docker images -aq | foreach {docker rmi $_ -f}

Hope this post has some benefit for you.