How to delete remaining docker digest in Images when tag are already removed ?

Posted September 16, 2020 2.3k views
DockerCustom ImagesDigitalOcean Spaces


I have create a docker private repository in Images.

I push multiple docker images and tag them with versions number.

Yesterday, I try to clean the repository by removing all the old versions of the image (old tags).

But I don’t check the “Remove digest option” in the popup. So it only removed the tag and not the associated digest.

Now, I don’t have the tags listed anymore but I still have the digests using space and I can’t delete them easily from UI. How could I fix that ?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Remove image/tag from Docker Hub using API
To delete a tag from Docker Hub you need and auth token and perform a delete HTTP call to the registry

  • Hi Marks,

    Thanks for your answer but I’m not using DockerHub at all. Only digital ocean images. It’s a custom images that I tagged and then I pushed on digital ocean private repository.

    Is a similar API is available on digital ocean repository ?

you can use doctl

doctl auth init
doctl registry repo list-tags <your repo>
doctl registry repo delete-manifest <your repo> sha256:<digest>
doctl registry gc start

check if job was done

doctl registry garbage-collection get-active