Tools, FAQ, Tutorials:
"docker container rm ..." - Remove All Containers
How to remove all containers from the Docker Engine with "docker container rm ..." command?
✍: FYIcenter.com
If you have created many containers on the Docker Engine and you want to remove them all, you can use the "docker container rm ..." command with a sub-command to specify the list of all container IDs.
1. Run "docker container list --all --quiet" to get a list of all container IDs.
fyicenter$ docker container list --all --quiet 24fc134f1a5a 660f6e09a539 e744e7509b13 07c676e97a34 81c5c69c5fcd
2. Embed the above command into the "docker container rm" command to remove them all.
fyicenter$ docker container rm $(docker container list --all --quiet) 24fc134f1a5a 660f6e09a539 e744e7509b13 07c676e97a34 81c5c69c5fcd
2. Try to list all containers. There should be no container left.
fyicenter$ docker container list --all CONTAINER ID IMAGE COMMAND ...
⇒ "docker container create" - Create Container Command
⇐ "docker container rm" - Remove Container
2019-09-12, 1013🔥, 0💬
Popular Posts:
How to add images to my EPUB books Images can be added into book content using the XHTML "img" eleme...
How To Get the Minimum or Maximum Value of an Array in PHP? If you want to get the minimum or maximu...
Can You Specify the "new line" Character in Single-Quoted Strings? You can not specify the "new line...
How to use the "return-response" Policy statement to build the response from scratch for an Azure AP...
How to build a test service operation to dump everything from the "context.Request" object in the re...