Docker: How to delete all local Docker images

后端 未结 16 2330
梦谈多话
梦谈多话 2021-01-29 17:24

I recently started using Docker and never realized that I should use docker-compose down instead of ctrl-c or docker-compose stop to get r

16条回答
  •  梦如初夏
    2021-01-29 17:28

    Adding to techtabu's accepted answer, If you're using docker on windows, you can use the following command

    for /F "delims=" %A in ('docker ps -a -q') do docker rm %A

    here, the command docker ps -a -q lists all the images and this list is passed to docker rm one by one

    see this for more details on how this type of command format works in windows cmd.

提交回复
热议问题