how to remove multiple docker images and stop container running it code example
Example 1: remove docker container
docker ps -aq
docker stop $(docker ps -aq)
docker rm $(docker ps -aq)
docker rmi $(docker images -q)
Example 2: docker stop all
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
Example 3: docker remove image
docker image rm [OPTIONS] IMAGE [IMAGE...]
--force , -f Force removal of the image
--no-prune Do not delete untagged parents
Example 4: how to remove a docker container
docker container rm [container id]