LoginSignup
2

More than 5 years have passed since last update.

Dockerにディスク圧迫されし者へ贈るバルスコマンド

Posted at

バルス発動

下記コマンド実行し、25Gくらい使用されたディスクの16Gを開放する事に成功した!
Dockerを利用し続けたゴミがこんなにも残っていたとは。。。

$ docker system prune

WARNING! This will remove:
    - all stopped containers
    - all volumes not used by at least one container
    - all networks not used by at least one container
    - all dangling images
Are you sure you want to continue? [y/N] y

...中略

Total reclaimed space: 16.49GB

コマンドの解説

警告文にも書かれていますが、不要と思われる下記の対象を削除します。

削除対象
- all stopped containers (停止中のすべてのコンテナ)
- all volumes not used by at least one container (少なくともひとつのコンテナにも利用されていないすべてのボリューム)
- all networks not used by at least one container (少なくともひとつのコンテナにも利用されていないすべてのネットワーク)
- all dangling images (不要なすべてのコンテナイメージの削除。不要=TAGが<NONE>になっているDocker image)

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2