DockerHub Image prune untagged danging images

Like many people, we’re starting to take a look at our storage use with DockerHub. We were under the “mistaken” impression that removing the tag would clean up the storage and that’s clearly not the case.

How do you do an “image prune” (untagged images) to recover the storage?

AI referred me to “Docker Hub API” which does not support prune.

Surely there is something very basic I’m missing?

The hub tool supports removing the tag, which does not clean up the image (or the storage)…

hub-tool tag rm REPOSITORY:TAG

1 Like

It will not happen immediately. There is some garbage collection. We discussed it recently in another topic too

It’s not happening at all. We’ve got over 1.2 TB in things that have been “untagged”.
Apparently in the regular API there is a call where you can delete all untagged images, but I cannot find a means to implement with hosted “dockerhub”.

Let me try to get more info about this.

It turned out that message which appears when we delete a tag is outdated but will be fixed. Also the limit will not be enforced for some time and a tool will be released to be able to free up space.

So for now, it seems you have nothing to wory about.

update:

And when the tool for deleting images is released, if the repo contains more images than allowed, the repo will be read-only until you free up space.

1 Like

Dockerhub has communicated to customers that they will start charging for overages on 3/1/25:

Based on my current assessment, with a card on file, this will create a 12-14X multiple of our existing budget. That’s not going to fly. Waiting until we are billed (within the next 30 days) and no release date on a support tool, you can understand the “discomfort” here…

I do. And I’m still trying to learn more about this. It is possible there is still a misunderstanding in our private discussion with Docker, but I will share your new thoughts as well and come back when I have more information. For now, if I understand it correctly, the curent message when trying to delete a tag already refers to the tool that will help to free up space. But the text was the same last December, so I try to find out what “January” means in this case and what it will mean regarding the new pricing.

So there was a misunderstanding indeed, but Docker confirmed that there will be no pricing implications until the new tool is released to free up space and they will leave enough time to delete old images before they start to charge people for it.

I recommend keeping an eye on the Docker blog, newletters or on any channel where they share announcements to be up-to-date about the new pricing. For now, it is confirmed, you don’t need to worry about additional charges and users will be notified in time to be able to delete data.

Thanks. I’ve been on the blog and other than a few “deadline” dates around storage, I couldn’t find an “official” announcement that storage pricing will not change until tool release. We’ve got dev on their slack channel. If there is an “official announcement” on this that I can’t find, I’d appreciate a link. Thanks for your help.

I recommended the blog (and other channels like Slack or twitter (X)) just in case they post an announcement which I miss. But I intend to share if I see an announcement.

I understand your concern, so I will ask someone from Docker to confirm what I shared directly.