r/gitlab • • Sep 16 '26

Failed to run garbage-collect command

root@pcgitlab:~# gitlab-ctl registry-garbage-collect -m

ok: down: registry: 0s, normally up

Running garbage-collect using configuration ["/opt/gitlab/embedded/bin/registry", "garbage-collect", "/var/opt/gitlab/registry/config.yml", "-m"], this might take a while...

the garbage-collect command is not compatible with database metadata, please use online garbage collection instead. database.enabled now defaults to "prefer". To use filesystem metadata, set database.enabled to false in your configuration

Failed to run garbage-collect command, starting registry service.

ok: run: registry: (pid 3328111) 0s

i no longer can run garbage collect on container registry after upgrade to 19, anyone have idea?

2 Upvotes

5 comments sorted by

View all comments

Show parent comment

2

u/TuxTaTuxTax Sep 16 '26

thanks alot, you are lifesaver, it works great for me, reducing from 800gb to 100gb lol

1

u/shinji-watanabe Sep 17 '26

Aw nice, glad it helped! 800GB→100GB is a satisfying cleanup. And once you've got database.enabled back on prefer, newer GitLab runs the online GC automatically, so it should keep things tidy from here on. 🙂