You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’d like to suggest adding an -a, --all option to the docker rm command. With this we could do commands like docker rm --all --force. It would allow us to remove all containers, both running and stopped, with a single command. Currently, we have to stop them first and then remove them, which feels a bit clunky.
Podman has this functionality built in. Adding this option to Docker would streamline the process and improve the user experience.
I think this one still needs a wider discussion, because these commands were primarily designed to interact on a single containers, or a list of containers provided as argument. Performing batch operations is somewhat conflicting with that design, which is why this was not implemented originally (besides the potential risk of a single flag being a bit of a "foot-gun" and a destructive operation).
I find myself doing docker stop $(docker ps -q) and docker rm $(docker ps -aq) probably to the point where I should've created a shell alias by now, so I do think we should look into. Nonetheless, it might make sense to see where we should implement it, as it could make sense to do it engine-side.
Description
I’d like to suggest adding an
-a, --all
option to thedocker rm
command. With this we could do commands likedocker rm --all --force
. It would allow us to remove all containers, both running and stopped, with a single command. Currently, we have to stop them first and then remove them, which feels a bit clunky.Podman has this functionality built in. Adding this option to Docker would streamline the process and improve the user experience.
References
The text was updated successfully, but these errors were encountered: