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