docker remove not running containers 1

docker remove not running containers

docker container rm $(docker container ls –aq)

Here is what the above code is Doing:
1. docker container ls -aq: List all containers (only IDs)
2. docker container rm: Remove all containers

Similar Posts