Garbage Collection doesn't work properly

Hello guys!

Some months ago I’ve installed and configured my first Container Registry along with my own instance of GitLab (current version - v16.3.0-ee).

I use that registry to store my app`s images. I always use the same tags: “prod”, “dev” and etc. The new image with “dev” tag overrides old image this “dev” tag.
But the problem is that there are huge amount of abandoned images on my local drive and it is full (99% of total space!)

I tried to run garbage collection in registry container (with the -m option):

registry garbage-collect --delete-untagged /etc/docker/registry/config.yml

As result some blobs was removed, but there are many ones that don’t want to be cleaned:

265 blobs marked, 0 blobs and 0 manifests eligible for deletion

For example: below all blobs for my one project (named as phoenix-vue).

I see here two real images (two manifests):

But I see many outdated blobs, which I want to remove completely!

If I run garbage-collect command directly in GitLab container (not in Registry container) I got next:

root@phxgit:/# gitlab-ctl registry-garbage-collect
Container registry is not enabled, exiting...

Once again:

  1. The GitLab instance installed by Docker image (gitlab/gitlab-ee:latest)
  2. The Container Registry installed by Docker image too (registry:2)
  3. Garbage collection command (with -m (--delete-untagged) option) does not delete all outdated images (blobs). That’s why my local drive is full :(.

I need help :exploding_head: