linux - How to remove all Docker containers -
i want remove of docker containers @ once. tried use $ docker rm [container_id] so, removed 1 container, not all.
is there way remove docker containers using 1 single line of code?
remove containers based on status:
docker rm -v $(docker ps --filter status=exited -q)
note:
- the "-v" option delete volumes associated containers.
to clean out containers on development machine:
docker kill $(docker ps -qa) && docker rm -v $(docker ps -qa)
Comments
Post a Comment