Gitlab Remove Project – Faster and Secure Way

Bits Lovers
Written by Bits Lovers on
Gitlab Remove Project – Faster and Secure Way

I had to clean up a bunch of old projects on GitLab recently, and figured I’d write this down while it’s fresh. If your GitLab instance has too many abandoned repos, it gets annoying fast – you waste time digging through projects that nobody has touched in months. Here is how to remove a project on GitLab.

One thing to keep in mind: deleting a GitLab project is permanent. All the repos, issues, merge requests, and pipelines are gone after the retention period ends. You probably have a backup, but it is still worth double-checking before you hit that button.

Also, you might not actually need to delete the project. If you are just trying to reorganize, you can transfer a project to a different group or namespace instead. And if the branch names are the problem, you can rename a specific branch on Gitlab without touching the whole project.

You need to be the project owner or a GitLab administrator to delete a project. If you only have developer or maintainer access, the delete option will not show up – you will see “rename project” but not “remove project.”

How to Delete a GitLab Project

These steps work for current GitLab versions (self-managed and GitLab.com):

  1. Go to the project page you want to delete.
  2. In the left sidebar, click Settings then General.

Access the General options menu to delete a project on Gitlab

  1. Scroll to the bottom and expand the Advanced section.

Access the Advance option to delete a project on Gitlab

  1. In the “Delete project” area, click Delete project.

Click on the Delete Project button to delete a project on Gitlab

  1. Type the project name to confirm, then click Confirm.

Type the Project name to delete a project on Gitlab

What happens after you delete

On GitLab.com, the project is not removed right away. It gets marked for deletion and stays in a pending state for 30 days before it is permanently removed. On self-managed GitLab instances, your admin configures the retention period.

During that retention window, an administrator can still restore the project. Once the retention period ends though, everything is gone for good – the repository, issues, merge requests, CI/CD pipelines, the whole thing.

A couple of details worth knowing:

  • Scheduled CI/CD pipelines stop running as soon as the project is marked for deletion.
  • If the person who scheduled the deletion loses access to the group or project before the retention period ends, the project gets restored automatically.
  • On self-managed GitLab, you can permanently delete a project immediately after marking it for deletion by going back to Settings > General > Advanced and clicking Delete permanently. This option is not available on GitLab.com – you would need to open a support ticket for that.

Conclusion

Deleting a project on GitLab is straightforward once you know where the option lives. The hard part is finding it the first time, since it is buried under Settings > General > Advanced. Just make sure you have the right permissions and that you actually want to delete the project before confirming.

Check all posts related to Gitlab.

Bits Lovers

Bits Lovers

Professional writer and blogger. Focus on Cloud Computing.

Comments

comments powered by Disqus