buy tb500

Docker deletes all containers that have a status of exited

docker rm $(docker ps -a -q -f status=exited)

or

docker container prune

the two commands are same, the latest one is the newest one. in the new version of Docker

This command deletes all containers that have a status of exited. In case you’re wondering, the -q flag, only returns the numeric IDs and -f filters output based on conditions provided. One last thing that’ll be useful is the --rm flag that can be passed to docker run which automatically deletes the container once it’s exited from. For one off docker runs, --rm flag is very useful.

Leave a Reply


Warning: Undefined variable $user_ID in /home/alzweac/public_html/knowledge/wp-content/themes/diet1/comments.php on line 74