DEV Community

loading...

How to remove all docker images locally

Ulisses Meira
・1 min read

Windows:

Powershell
docker images -a -q | % { docker image rm $_ -f }

Commandline
for /F %i in ('docker images -a -q') do docker rmi -f %i

Linux:

docker rmi -f $(docker images -a -q)

Discussion (1)

Collapse
suavebajaj profile image
Suave Bajaj • Edited

Use : docker image prune -a