First let’s check both running and stopped containers,

docker ps --all

You can remove one by using,

docker rm _container-ID_

Important

docker rm and docker stop aren’t same! You can use docker start to start a stopped container!


And finally,

docker system prune

Important

WARNING! This will remove:- all stopped containers- all networks not used by at least one container- all dangling images- all dangling build cache