Stopping and removing all running Docker containers

Submitted by Jochus on Tue, 13/06/2017 - 07:44 | Posted in: Linux


In case you want to stop AND remove all running containers, you can perform the following commands on a terminal:

$ docker stop $(docker ps -a -q)
$ docker rm $(docker ps -a -q)

Add new comment

The content of this field is kept private and will not be shown publicly.

Full HTML

  • Lines and paragraphs break automatically.
  • You can caption images (data-caption="Text"), but also videos, blockquotes, and so on.
  • Web page addresses and email addresses turn into links automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <bash>, <cpp>, <java>, <php>, <sql>, <xml>. The supported tag styles are: <foo>, [foo].