sudo docker run --rm code example Example 1: docker force remove container docker rm -f [containerid] Example 2: docker remove container docker system prune