How can I delete Docker's images?

后端 未结 17 1272
执笔经年
执笔经年 2020-11-29 14:27

I\'ve the following images:

alex@alexvps:~$ sudo docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
&         


        
17条回答
  •  生来不讨喜
    2020-11-29 14:57

    To delete some Docker image you must execute the following command:

    $ docker rmi 
    

    So, to delete all Docker images you can execute the following command:

    $ docker rmi $(docker images -q)
    

    Now, if you want delete all Docker images (including images that are in use), you can add the flag -f, for example:

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

提交回复
热议问题