docker ps -a
# ids only, which is the form the bulk commands want
docker ps -aq
# remove the stopped ones; the running ones are refused, which is correct
docker rm $(docker ps -aq)
docker ps -a
# ids only, which is the form the bulk commands want
docker ps -aq
# remove the stopped ones; the running ones are refused, which is correct
docker rm $(docker ps -aq)