[FEATURE REQUEST] docker system prune --all
or equivalent command to remove all docker data (containers, volumes, networks, images and cached layers)
#617
Labels
community_new
New idea raised by a community contributor
Tell us about your request
I would like to see a single command in the docker CLI that stops all containers, removes all images, caché layers, volumes and networks at once, so the environment in completely clean and empty as the first time that docker is installed.
Which service(s) is this request for?
This request is for the docker CLI.
Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?
The problem that I am trying to solve is to reset the state of docker to the state that it has when it is installed with a simple and handy command in the docker CLI.
I am always frustrated when I want to delete all docker content and I need to type many commands to do so.
Sure, I can have a script that does it too as a one-liner, but then I need to worry about that script.
Are you currently working around the issue?
Yes. In this GitHub Gist there are many options to work around the issue.
Particularly, this is the one-liner command that I use to work around the issue:
Honors to @acjohnson for the shell one-liner command.
Additional context
This is a quote from @Maxzor in the GitHub Gist that I posted in the previous section:
I wonder if maybe this is not in the docker binary because of its destructive potential.
Anyway, I agree because I think this should be in the docker binary in order to avoid having to mess up with shell commands to do an action that is purely related to Docker.
The text was updated successfully, but these errors were encountered: