sudo docker system prune code example
Example 1: remove stopped containers
$ docker rm $(docker ps -a -q)
Example 2: docker purge all
docker system prune [OPTIONS]
$ docker rm $(docker ps -a -q)
docker system prune [OPTIONS]