docker delete inactive container code example
Example 1: docker remov all running containers
docker rm $(docker ps -aq)
Example 2: how to delete docker containers
docker system prune -a
docker rm $(docker ps -aq)
docker system prune -a