How do I remove a docker container?
To remove one or more Docker containers, use the docker container rm command, followed by the IDs of the containers you want to remove. If you get an error message similar to the one shown below, it means that the container is running. You’ll need to stop the container before removing it.
How do I stop and delete all Docker containers?
kill all running containers with docker eliminate $(docker ps -q) delete all stopped containers with docker rm $(docker ps -a -q)