Docker: How to delete all local Docker images

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

    Use this to delete everything:

    docker system prune -a --volumes
    

    Remove all unused containers, volumes, networks and images

    WARNING! This will remove:
        - all stopped containers
        - all networks not used by at least one container
        - all volumes not used by at least one container
        - all images without at least one container associated to them
        - all build cache
    

    https://docs.docker.com/engine/reference/commandline/system_prune/#extended-description

提交回复
热议问题