Gitlab-rails/shared/lfs-objects/tmp/cache ballooned in size

Our GitLab instance is running very low on space. We have one repo that uses LFS. The repo size is just over 170GB when cloned. However its taking substantially more space on the instance. Ive checked and the following path is the culprit “gitlab/gitlab-rails/shared/lfs-objects/tmp/cache/”
This has ballooned to over 370GB. Ive tried all the usual things. Ran a prune on the clone and pushed up any changes. Ran the command " gitlab-rake gitlab:cleanup:orphan_lfs_file_references PROJECT_ID=20", restarted the Gitlab but the tmp remains. Question is, is it safe to remove files from this location and if not whats the best approach to remove any unwanted cache?

I just checked on mine, and I’m using LFS, the tmp/cache directory is completely empty on mine. Could be failed uploads that have appeared in this directory and not cleared themselves. This: Configure LFS tmp cache directory when using network attached shared storage (#17048) · Issues · GitLab.org / GitLab · GitLab confirms that they are temporary files. The fact also that mine is empty when I use LFS also confirms that. Can’t find any commands to clear this, but you should be safe to just delete the contents of tmp/cache.

EDIT: Clean up Rake tasks | GitLab

this page does give some other cleanup commands, eg:

gitlab-rake gitlab:cleanup:project_uploads

Thanks a lot for checking

Thanks. The artefacts cleanup did come up with some files. Maybe Ill try that firstly