How to remove all stopped docker containers

Removing all docker containers that are currently stopped is simple:

docker container prune

In case you want to skip the Are you sure you want to continue? [y/N] confirmation, use:

docker container prune -f

Also see our post on How to remove all docker images that are not associated to a container.