LoginSignup
2
2

More than 5 years have passed since last update.

動いていないdocker コンテナをすべて消去する方法

Last updated at Posted at 2016-06-13

以下のコマンドを実行すればよい

for ct in `diff <(docker ps -a -q)  <(docker ps -q) --old-line-format='%L' --new-line-format='%L' --unchanged-line-format=''`; do
  docker rm $ct;
done

参考資料

以下を参考にしました

2
2
2

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
2