Image tag deletion using Docker API

Hi all,

I’m trying to automate deleting image tags based on the creation date using Docker API when I try to test my deletion script I discovered that some of the tags shared the same sha256


This presented a significant challenge because, in order to remove tags the Docker API only accepts the image name and the sha256 of the tags;

even if I filter the tags based on the creation date if any of these tags share the same sha256, all of the tags will be remove.

Is anyone can help me to avoid this problem?