Inactive project deletion
- Tier: Free, Premium, Ultimate
- Offering: Self-managed
Administrators of large GitLab instances can find that over time, projects become inactive and are no longer used. These projects take up unnecessary disk space.
With inactive project deletion, you can identify these projects, warn the maintainers ahead of time, and then delete the projects if they remain inactive. When an inactive project is deleted, the action generates an audit event that it was performed by the @GitLab-Admin-Bot.
For the default setting on GitLab.com, see the GitLab.com settings page.
Configure inactive project deletion
To configure deletion of inactive projects:
- On the left sidebar, at the bottom, select Admin.
- Select Settings > Repository.
- Expand Repository maintenance.
- In the Inactive project deletion section, select Delete inactive projects.
- Configure the settings.
- The warning email is sent to users who have the Owner and Maintainer role for the inactive project.
- The email duration must be less than the Delete project after duration.
- Select Save changes.
Inactive projects that meet the criteria are scheduled for deletion and a warning email is sent. If the projects remain inactive, they are deleted after the specified duration. These projects are deleted even if the project is archived.
Configuration example
Example 1
If you use these settings:
- Delete inactive projects enabled.
- Delete inactive projects that exceed set to
50
. - Delete project after set to
12
. - Send warning email set to
6
.
If a project is less than 50 MB, the project is not considered inactive.
If a project is more than 50 MB and it is inactive for:
- More than 6 months: A deletion warning email is sent. This mail includes the date that the project will be deleted.
- More than 12 months: The project is scheduled for deletion.
Example 2
If you use these settings:
- Delete inactive projects enabled.
- Delete inactive projects that exceed set to
0
. - Delete project after set to
12
. - Send warning email set to
11
.
If a project exists that has already been inactive for more than 12 months when you configure these settings:
- A deletion warning email is sent immediately. This email includes the date that the project will be deleted.
- The project is scheduled for deletion 1 month (12 months - 11 months) after warning email.
Determine when a project was last active
You can view a project’s activities and determine when the project was last active in the following ways:
- Go to the activity page for the project and view the date of the latest event.
- View the
last_activity_at
attribute for the project using the Projects API. - List the visible events for the project using the Events API.
View the
created_at
attribute of the latest event.
Docs
Edit this page to fix an error or add an improvement in a merge request.
Create an issue to suggest an improvement to this page.
Product
Create an issue if there's something you don't like about this feature.
Propose functionality by submitting a feature request.
Feature availability and product trials
View pricing to see all GitLab tiers and features, or to upgrade.
Try GitLab for free with access to all features for 30 days.
Get help
If you didn't find what you were looking for, search the docs.
If you want help with something specific and could use community support, post on the GitLab forum.
For problems setting up or using this feature (depending on your GitLab subscription).
Request support