Full Stack LAMP - MEAN Developer, Python developer. Certified Azure Developer. Freelance programmer/consultant/trainer.

The docker system prune command removes all stopped containers, dangling images, and unused networks. If you pass the --volumes flag, it will remove all unused volumes too.

You can execute the below commands in the terminal to remove all the images and docker containers as described above.

docker system prune
docker system prune --volumes

You can also use docker image rm command to remove one or more images.

Syntax

docker image rm [OPTIONS] IMAGE [IMAGE...]

OPTIONS:
--force , -f Force removal of the image 
--no-prune Do not delete untagged parents

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.