Docker Registry v2 Cleanup?

Keff - May 13 '20 - - Dev Community

If you use Docker you will know that it clogs your disk space rather quickly. We use it in most of our projects, with our own Registry. But the thing is, it clogs up the disk space with obsolete blobs, digests, and manifests... We had over 1 TB of obsolete stuff...

We have been trying to find an official way of cleaning the registry up, we have found GarbajeCollector although it only works if you remove the references by hand, then it removes the blobs.

My question is, any of you have been able to completely automate the removal of outdated Images aka blobs in the Registry? Or if not, is there any good tool out there?

EDIT:

My colleague got it working with GarbajeCollector in the end, although it only works with registry > 2.7 & passing -m flag.

If you have the same problem and need more info please let me now!

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .