Delete old (archived) jobs - Save disk space

I am aware that there is lot of documentation all around, but still I am unable to free up some disk space.

Situation is shown below and my issue is the used disk space of this project (using CI):
Storage: 215.6 MB (Repository: 29 MB / Wikis: 92 KB / Build Artifacts: 186.4 MB / LFS: 0 Bytes)

Off course 215MB isn’t even an issue, but we have 100+ projects running on our gitlab instance and some are getting big. Keep adding disk space does not seem to be the best approach to me. Not all of our projects use CI already, but they might … hence my early investigation of how to tackle this.

What I tried:

  1. Enabled log archiving => This is enabled & works as it is mentioned on top of archived jobs
  2. Enabled artifacts expiration => I though this would be able to clean up the archived logs, but apparently it did not. The feature just cleans up artifacts generated during the job.
  3. Invoke (POST) erase API call => Works, but gives a 403 forbidden. After some investigation it seems to be normal if it concerns archived jobs to get a 403.
  4. Invoke DELETE artifacts API call => Same as above, I do get the 204 as expected but the trace will remain in artifacts anyway.
  5. Ask this forum for advice

Maybe I should start cleaning up the artifacts folder “/var/opt/gitlab/gitlab-rails/shared/artifacts/” manually?

Any documentation/links/tutorials on how I can get rid of jobs/pipelines and all related content would be appreciated…
Thanks in advance!

Sounds like you’ve hit the problem described in

If I recall correctly there are both guides in there to how you can remove old artifacts, and tools to do it.

That is indeed the issue I encounter, but the origin of the used disk space is not exactly the same :slight_smile:
I posted a question over there, as the solutions mentioned in the issue do not work for archived jobs. (I already used the API its job erase functionality on the gitlab API)

Thanks grove!