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

2 Likes

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.

The tool is finally here but there is no button to clean all dangling images. You can only delete images by selecting the checkbox. Seriously, this is very difficult to clean up a repo. And I have 192 repos, thousands images.

I think this is very hard to maintain, we will have to move to harbor. If our organization doesn’t use dockerhub, there is no reason to keep paying docker, podman can totally fulfill our usage. It is a 100% drop in replacement for us . I am really surprised that Docker do all this for couple Terabytes.

Which tool are you talking about? Can you share a link? I only found this old experimental version.

Since checkboxes indicate a ui, I assume it’s the Image Management beta feature on Docker Hub.

1 Like

I just realized I missed the release of the image management tool and came here to share, but you were faster (and I missed your post too until now).

I’m not sure how Podman solves an image registry issue. Do you mean you switch to another registry as well?

Regarding searching for untagged images, I fully understand you.

I asked about the filters internally and the same source who told me about the coming image management tool told me now that filtering to untagged images will come in a later version. Automated lifecycle rules on untagged content is planned too, but there are no specific dates.

People will have plenty of time to use the tool before it matters, but I know the dates in the documentation still don’t confirm it. Hopefully they will update it soon now that we talked about it again.

yeah, I thought I said moving to Harbor. I have decided to pull all images down and let Harbor handle the retention issue. I think I am inclined to move away from docker. I was the one pushing our organization to pay docker 2 years ago. I am deeply regreted that decision now. I think the whole thing is terrible. They have said they will charge you extra $10 per 100G from 3/1. And they don’t have any usable tool for us to manage this.

Yeah, I think this tool is a joke. I don’t know if you ever really try it not just click around. We have more than a thousand images in one repo. The best this tool can do is delete 15 images at a time. And it is on the fly. No queue task etc, so you have to wait like 10 seconds for it to response. And the filter is almost useless as well. Obviously everyone is trying to remove untag images and there is no such filter.

I hope Docker realize this is not the way to do business. It will just push people away.

And you did, sorry. I shouldn’t even have commented yesterday until some sleep.

Well, it’s not finished yet. I’m not aware of the exact reasons why things went this way, and it is probably not what I could share anyway, I believe the tool will be much better, but communication needs to be improved as uncertainty is not what companies like, I know.

I’m still optimistic about the future of the tool and when they will start charging users for the data, but I understand you and I think well-expressed critisism / opinion coming from users is important. So thank you for your comment and time.

Your frustration is completely understandable. Docker imposes deadlines without providing adequate tools for preparation.

However, please keep in mind that this is a community forum - people here are Docker user, not Docker employees.

1 Like

when they will start charging users for the data

I think they said 3/1. I am not going to wait and find out.

The date should have been updated in the documentation. It finally happened. Today this was also brought to my attention:

  • Storage Charges Delayed Indefinitely – Previously, we announced plans to introduce storage-based billing, but we have decided to indefinitely delay any storage charges. Instead, we are focusing on delivering new tools that will allow users to actively manage their storage usage. Once these tools are available, we will assess storage policies in the best interest of our users. If and when storage charges are introduced, we will provide a six-month notice, ensuring teams have ample time to adjust.
3 Likes

Well, I really appreciate they change their mind. We will keep our membership indefinitely then :slight_smile:

Have to say, I did spend my Sunday setup Harbor and replication pulled all our production images.