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

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -