docker remove all containers not working code example
Example 1: docker remove all containers
docker rm $(docker ps -a -q)
Example 2: delete all containers created x hours ago
# Delete all stopped containers
docker container prune
docker rm $(docker ps -a -q)
# Delete all stopped containers
docker container prune