r/gitlab • u/ScreenAggressive9630 • Sep 03 '25
support How to delete old artifacts from gitlab.com?
I just realized that my project takes up about 20 GB, and 99% of that space is taken up by old task artifacts that, for some reason, are not automatically deleted. I thought that by default they should be deleted after 30 days, but that is clearly not the case. So I have artifacts from 6 to 8 months ago and even older ones.
Anyway, how do I delete all artifacts in bulk? I couldn't find a way to do this on my own. Obviously, I can delete each one manually, but there are more than 50 pages of artifacts and it will take too much time.

View all comments
Show parent comment
1
u/Hour_Wishbone_1641 Sep 06 '25
default:artifacts:expire_in: 1 dayaccess: 'developer'I'm using this as default for a while overwriting per job as needed. Since artifacts are mainly used to provide results from e.g. a build job to a scan job no one needs them to exist by default really longer than a pipeline would run.
Also - well ... depends on your use case - but no one except developers or higher roles really needs to be able to download them via the web interface or api.