Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationEventAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
669
Help us understand the problem. What is going on with this article?

More than 3 years have passed since last update.

@boiyama

Docker一括削除コマンドまとめ

停止コンテナ、タグ無しイメージ、未使用ボリューム、未使用ネットワーク一括削除

>=1.13

$ docker system prune

停止コンテナ一括削除

<=1.12

$ docker rm `docker ps -f "status=exited" -q`

>=1.13

$ docker container prune

全コンテナ一括削除

$ docker rm -f `docker ps -a -q`

未使用イメージ一括削除

<=1.12

$ docker rmi `docker images -q`

>=1.13

$ docker image prune

タグ無しイメージ一括削除

$ docker rmi `docker images -f "dangling=true" -q`

未使用ボリューム一括削除

<=1.12

$ docker volume rm `docker volume ls -q`

>=1.13

$ docker volume prune

未使用ネットワーク一括削除

<=1.12

$ docker network rm `docker network ls -q`

>=1.13

$ docker network prune
669
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
669
Help us understand the problem. What is going on with this article?