docker rm $(docker ps -aq)

Category: Docker

docker rm $(docker ps -aq)

Remove all stopped containers

Removes all stopped containers in one command. docker ps -aq lists all container IDs.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.