Skip to content

docker rm -a [--all] - delete all containers#6112

Closed
michaelneale wants to merge 1 commit intomoby:masterfrom
michaelneale:cleanup_containers
Closed

docker rm -a [--all] - delete all containers#6112
michaelneale wants to merge 1 commit intomoby:masterfrom
michaelneale:cleanup_containers

Conversation

@michaelneale
Copy link
Copy Markdown
Contributor

This is a simple addition to the rm command. Developers end up with a proliferation of containers when using docker,
this lets you clear them out in one fell swoop (as is part of rm command, other flags still apply.
Won't force remove unless told do, for example).

Docker-DCO-1.1-Signed-off-by: Michael Neale michael.neale@gmail.com (github: michaelneale)

This is a simple addition to the rm command. Developers end up with a proliferation of containers when using docker,
this lets you clear them out in one fell swoop (as is part of rm command, other flags still apply.
Won't force remove unless told do, for example).

Docker-DCO-1.1-Signed-off-by: Michael Neale <michael.neale@gmail.com> (github: michaelneale)
@crosbymichael
Copy link
Copy Markdown
Contributor

You can already do:

docker rm `docker ps -aq`

We have discussed this before and prefer uses to use the above line without having to add additional code to docker.

@cauerego
Copy link
Copy Markdown

As for "we have discussed this before", it started on #928

And here's how I got here, an interesting read to whom this might be of some importance:
http://stackoverflow.com/a/24277052/274502

Also I rather do docker rm $(docker ps -aq -notrunc) for easier code sharing on MD. ;P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants