--rm docker code example
Example 1: docker remove all containers
docker rm $(docker ps -a -q)
Example 2: docker delete all containers
sudo docker stop $(docker ps -a -q)
sudo docker rm $(docker ps -a -q)
Example 3: docker force remove container
docker rm -f [containerid]
Example 4: docker remove container
docker system prune