How to delete all Docker local Docker images

2020-05-10 16:27发布

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 rid of my experiments. I now have a large number of unneeded docker images locally.

Is there a flag I can run to delete all the local docker images & containers?

Something like docker rmi --all --force --all flag does not exist but I am looking for something with similar idea.

13条回答
别忘想泡老子
2楼-- · 2020-05-10 17:25

Delete without invoking docker:

rm -rf /var/lib/docker

This is not advised if you can run docker normally, but if for whatever reasons you can't or don't want to, this will work.

查看更多
登录 后发表回答