From 403f9fc357d64ccbdf82e1c4cbad2946eb1d1080 Mon Sep 17 00:00:00 2001 From: Roberto Gandolfo Hashioka Date: Fri, 8 Nov 2013 16:47:42 -0800 Subject: [PATCH 1/2] - Added delete all the containers example --- docs/sources/commandline/cli.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/sources/commandline/cli.rst b/docs/sources/commandline/cli.rst index 4e3d369e1..28fac978f 100644 --- a/docs/sources/commandline/cli.rst +++ b/docs/sources/commandline/cli.rst @@ -622,6 +622,15 @@ This will remove the container referenced under the link ``/redis``. This will remove the underlying link between ``/webapp`` and the ``/redis`` containers removing all network communication. +.. code-block:: bash + + $ docker rm `docker ps -a -q` + + +This command will delete all the stopped containers. The command ``docker ps -a -q`` will return all +the existing container's id and the ``rm`` command takes those id's and delete them. The running containers +will not be deleted, even though they will appear on that id's list. + .. _cli_rmi: ``rmi`` From 4ec0b515786ce266234d350fee872764974d2218 Mon Sep 17 00:00:00 2001 From: Roberto Gandolfo Hashioka Date: Sat, 9 Nov 2013 11:08:43 -0800 Subject: [PATCH 2/2] - Updated description --- docs/sources/commandline/cli.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/sources/commandline/cli.rst b/docs/sources/commandline/cli.rst index 28fac978f..026785214 100644 --- a/docs/sources/commandline/cli.rst +++ b/docs/sources/commandline/cli.rst @@ -627,9 +627,9 @@ network communication. $ docker rm `docker ps -a -q` -This command will delete all the stopped containers. The command ``docker ps -a -q`` will return all -the existing container's id and the ``rm`` command takes those id's and delete them. The running containers -will not be deleted, even though they will appear on that id's list. +This command will delete all stopped containers. The command ``docker ps -a -q`` will return all +existing container IDs and pass them to the ``rm`` command which will delete them. Any running +containers will not be deleted. .. _cli_rmi: