Docker: How to delete all local Docker images

后端 未结 16 2324
梦谈多话
梦谈多话 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:31

    To delete all images:

    docker rmi -f $(docker images -a | awk {'print $3'})
    

    Explanation:

    docker images -a | awk {'print $3'}

    This command will return all image id's and then used to delete image using its id.

提交回复
热议问题