title: Remove all stopped containers: "docker rm" requires at least 1 argument
body: <p>I'm reading a book on docker. It is a couple of years old.</p>
  
  <p>I'll cite:</p>
  
  <pre><code>If you want to get rid of all your stopped containers, you can use
  the output of docker ps -aq -f status=exited , which gets the
  IDs of all stopped containers. For example:
  $ docker rm -v $(docker ps -aq -f status=exited)
  </code></pre>
  
  <p>When I run this, I get:</p>
  
  <pre><code>michael@michael-desktop:~$ sudo docker rm -v $(docker ps -aq -f status=exited)
  Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.30/containers/json?all=1&amp;filters=%7B%22status%22%3A%7B%22exited%22%3Atrue%7D%7D: dial unix /var/run/docker.sock: connect: permission denied
  "docker rm" requires at least 1 argument(s).
  See 'docker rm --help'.
  
  Usage:  docker rm [OPTIONS] CONTAINER [CONTAINER...]
  
  Remove one or more containers
  </code></pre>
  
  <p><strong>Could you help me understand what should I do to gain what is intended.</strong></p>