list and remove all stopped containers docker code example Example: remove stopped containers $ docker rm $(docker ps -a -q)