Problem to Solve
Old Git LFS objects don’t get pruned from my GitLab repository (even after running the 'Prune Unreachable Objects'
command). This is causing my LFS consumption to increase significantly over time (even though my actual repository size isn’t increasing), which will eventually prevent me from uploading to my repository.
Steps to Reproduce
I manage a number of large files using Git LFS. Some of these are zip archives of various Java Runtime Environments, which I package into application releases (which in turn constitute the rest of my large files).
Because of this setup, each new build process creates new versions of these large files, which I subsequently push to my GitLab repository. My local .git
folder grows significantly after each build, as Git treats each new release as a new set of files (even though they directly replace the old ones). I can resolve this locally by running git lfs prune
, which removes the old Git LFS objects that no longer have valid references.
However, the pruning process doesn’t affect my GitLab repository, which means that my LFS usage increases significantly each time I push a new build. I’ve tried addressing this by using the 'Prune Unreachable Objects'
function (under 'Settings'
→ 'General'
→ 'Advanced'
→ 'Housekeeping'
), but that hasn’t changed my indicated LFS usage. I’ve also tried using the 'Run Housekeeping'
command, but that doesn’t work either.
Configuration
My GitLab repository contains no custom configurations.
Versions
GitLab SaaS Enterprise Edition 17.5.0-pre