Unable to Delete A Docker Image with Dependent Images

This post tells you how to delete a docker image with dependent images.

Problem Description

When trying docker rmi a12345678901, an error occurs as below.

Error response from daemon: conflict: unable to delete a12345678901 (cannot be forced) - image has dependent child images

Even if I add the flag -f, it also doesn’t work.

Root Cause

There are some dependent images so you cannot delete the image.


Remove unnecessary images.

docker rmi $(docker images --filter "dangling=true" -q --no-trunc)

And then delete the image.

docker rmi a12345678901


Can’t delete docker image with dependent child images - stackOverflow

Buy a cup of coffee for the author.