How can I delete all local Docker images?

Unix

To delete all containers including its volumes use,

docker rm -vf $(docker ps -aq)

To delete all the images,

docker rmi -f $(docker images -aq)

Remember, you should remove all the containers before removing all the images from which those containers were created.

Windows – Powershell

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

Windows – Command Line

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

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)