If you cannot remove an image even with “-f” option generating below error then you need to first find out the dependent images and delete them first.
[root@worker Prometheus]# docker rmi -f 109b803c6a30
Error response from daemon: conflict: unable to delete 109b803c6a30 (cannot be forced) - image has dependent child images#Below command will list down the child images (Put your parent image id instead of 109b803c6a30)docker inspect --format='{{.Id}} {{.Parent}}' $(docker images --filter since=109b803c6a30 -q)#Use below script to remove all the child imagesfor i in `docker inspect --format='{{.Id}} {{.Parent}}' $(docker images --filter since=109b803c6a30 -q)|awk -F":" '{print $2}'`; do docker rmi $i; done