When I reverse sort by date pulled, I see I have a lot of stale images.
It shows 15 items at most, and I’m reaching “1485–1500 of many” before the site starts erroring out, and I’ve not yet reached a point where I am seeing a moment in time for “last pulled” instead of ---.
At the end of the day it’s not my storage space I’m wasting and the service is free , but is there a more efficient way to clean this up? As far as I can tell, I can’t even set the page size to anything but 15.
For cleaning up stale images/tags more efficiently than paging through 15 items at a time, the recommended approach is to use Repository → Image Management in Docker Hub. From there you can filter/search/sort and multi-select items, then use Preview and delete → Delete forever. Docker notes that if the UI times out during deletion, the system will automatically retry the deletion in the background and you don’t need to take additional action: https://docs.docker.com/docker-hub/repos/manage/hub-images/manage/
Finally, Docker’s Image Management documentation links to a deletion API endpoint for bulk deletion. This uses the Docker Hub–supported subset of the Registry HTTP API v2 (delete by manifest digest), which is often more efficient than working through many UI pages: https://docs.docker.com/reference/api/registry/latest/
(Top-level Hub images management overview, if you want the index page too:) https://docs.docker.com/docker-hub/repos/manage/hub-images/
So you must have noticed I was already on that page because I shared the URL of that page. It does not allow for more than 15 items to be selected at once. Also, the UI time-out I mentioned has nothing to do with the actual deletion process.
My clean-up is, as explained, not tag-based.
I appreciate the linkdump to the docs but once again, having these stale images isn’t really my problem, I just thought this would be something that could have been done more efficiently. I have the inkling I’ve just explained myself (again) to the result of an AI prompt so I will leave this for what it is. Would have been nice to have a human in the loop though.
I understand why you could see that way, but AI answers are forbidden on this forum and when we see that, we delete those posts. You responded to a Docker Staff member who indeed missed some of your points, but your original post was not perfectly clear to me either. That is why I did not comment then, although I wanted to come back (sorry for not coming eventually) as this Image management issue was discussed a couple of times before. So I understand that it feels like not fully finished yet. @blakemain73953 noticed this topic got now reply yet and shared some thoughts.
If I look at the image management now, I also miss some filters like filtering by date or status, or filtering to untagged images. Or I would miss if I used the image management tool. Since I haven’t tested enough I did not recommend features to Docker, but as @bluepuma77 wrote, you could.
The actual implementation of some features might be difficult even if it looks obvious on the GUI, but hopefully some of the missing features are doable.
It is, but it is older than the Image management tool as far as I remember. There is an “imagetool” command under “docker buildx”, but it can only create and inspect images in the registry. There are other command line tools like “skopeo”, but I’m not sure which one could do what the image management on Docker Hub was made for.
True, but I also made that mistake somthimes when I wanted to answer too quickly and sadly I was not reading the post carefully…
That’s unfortunate, but I understand. If you have any issues later because of the image managment (or anything else actually) , feel free to come back. If I don’t forget it, I will try to learn more about the image management and hopefully next time I can give you better answers.