Docker: How to delete all local Docker images

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

    Here is short and quick solution I used

    Docker provides a single command that will clean up any resources — images, containers, volumes, and networks — that are dangling (not associated with a container):

    docker system prune
    

    To additionally remove any stopped containers and all unused images (not just dangling images), add the -a flag to the command:

    docker system prune -a
    


    For more details visit link

提交回复
热议问题