I want to remove all of my docker containers at once. I tried to use $ docker rm [container_id] to do so, but it removed only one container, not all.
Is there any way to remove all docker containers using one single line of code?
Remove containers based on status:
docker rm -v $(docker ps --filter status=exited -q)
To clean out all containers on my development machine:
docker kill $(docker ps -qa) && docker rm -v $(docker ps -qa)