Clearing old Articfacts from Builds

Hey all,
I’m currently running a scheduled backup of Gitlab everyday and I’ve noticed my backup sizes have increased considerably. Looking within the package I’ve noticed that it is mainly by artifacts.

These artifacts are the dependencies that are required by other steps in the CI build process, they are temporarily stored as artifacts with a expiry time which can be retrieved in later steps and at some point in the future be deleted. However I’ve only introduced the expiry time fairly recently and my guess is that old projects which didn’t retire their dependencies used are retaining old artifacts no longer needed.

What I am looking for is a way to delete/clear old builds and hopefully in the process remove the old artifacts as I am never going to need them. I know you can systematically go through each build and “Erase” them however with over 500+ builds now recorded this would be an extremely tedious process.

Any help to try and clean up these old artifacts and builds would be much appreciated.

1 Like

I’ve got the exact same issue. Can I just blow away some of the old artifact directories, or will this cause other problems.

Something like this
rm -rf /var/opt/gitlab/gitlab-rails/shared/artifacts/2017_01

Will gitlab automatically work out this folders have been purged and clean itself up?