rm the old continer in docker code example Example 1: remove stopped containers $ docker rm $(docker ps -a -q) Example 2: docker remove container docker system prune