I\'m reading a book on docker. It is a couple of years old.
I\'ll cite:
If you want to get rid of all your stopped containers, you can use
the output of
What seems to be happening is docker was started with different user. Hence, docker ps -aq -f status=exited could not be run due permission issue and as a result got blank result.
Running docker rm complains of missing argument due to blank result.
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: