In the course of time the size of data generated for gitlab-ci pipelines may grow quickly and sometimes reaches dozens of GB. The quantity of data stored on the gitlab's server for pipelines can be checked in the Settings -\> Usage Quotas panel of the project, or in Build -\> Artifacts. For projects with more than 10GB of artifacts there is certainly something to do to reduce the disk storage:
1) By cleaning old artifacts.
2) By disabling the "Keep artifacts from most recent successful jobs" in the Settings -\> CI/CD -\> Artifacts if not necessary because it keeps all job's artifacts (build, test, etc) of all the git refs (branches, tags, merge requests, ...) and this can cost a lot.
3) By changing the gitlab-ci jobs definitions, for example:
- use the [expire_in](https://docs.gitlab.com/ee/ci/yaml/#artifactsexpire_in) keyword to reduce the expiration time (30 days by default) of artifacts,
- use [cache](https://docs.gitlab.com/ee/ci/yaml/#cache) instead of artifacts when possible when jobs with dependencies can be executed on the same machine,
- generate fewer archives and lighter archives, keeping only what is strictly necessary.
## What are git-lfs's recommended uses?
### What is Git LFS?
...
...
@@ -430,6 +419,18 @@ After having done some cleaning, the storage quota can be recalculated on the pa
A grace period of 2 weeks preserves deleted objects. This can be shortened: https://docs.gitlab.com/ee/user/project/repository/reducing_the_repo_size_using_git.html#space-not-being-freed
### How do I clean the pipelines (artifacts, logs) ?
In the course of time the size of data generated for gitlab-ci pipelines may grow quickly and sometimes reaches dozens of GB. The quantity of data stored on the gitlab's server for pipelines can be checked in the Settings -\> Usage Quotas panel of the project, or in Build -\> Artifacts. For projects with more than 10GB of artifacts there is certainly something to do to reduce the disk storage:
1) By cleaning old artifacts.
2) By disabling the "Keep artifacts from most recent successful jobs" in the Settings -\> CI/CD -\> Artifacts if not necessary because it keeps all job's artifacts (build, test, etc) of all the git refs (branches, tags, merge requests, ...) and this can cost a lot.
3) By changing the gitlab-ci jobs definitions, for example:
- use the [expire_in](https://docs.gitlab.com/ee/ci/yaml/#artifactsexpire_in) keyword to reduce the expiration time (30 days by default) of artifacts,
- use [cache](https://docs.gitlab.com/ee/ci/yaml/#cache) instead of artifacts when possible when jobs with dependencies can be executed on the same machine,
- generate fewer archives and lighter archives, keeping only what is strictly necessary.
### How do I delete the oldest or most recent artefacts?