Remove all the stopped containers with docker prune
- prune
$ docker container prune
You can also use the force so it won’t ask you for confirmation.
$ docker container prune -f
$ docker container prune --force
to get help run
$ docker container prune --help