How to delete project in GitLab

How to delete project in GitLab

Steps to Delete a Project in GitLab

1. Sign In to GitLab

  • Go to the GitLab website or your GitLab instance.

  • Log in using your credentials.

2. Navigate to Your Project

  • Once logged in, navigate to the Project you want to delete.

  • You can either use the Search bar or go to the Projects section from the left-hand sidebar and select Your Projects.

  • Click on the project you want to delete to open it.

3. Go to Project Settings

  • In the left-hand sidebar of the project page, scroll down and click on Settings (it’s usually at the bottom of the sidebar).

  • In the settings menu, click on General.

4. Expand the 'Advanced' Section

  • Scroll down to the bottom of the General settings page.

  • You'll see an Advanced section. Click the Expand button to reveal more options.

5. Delete the Project

  • Within the Advanced section, you'll find the option Remove project.

  • Click on the Remove project button.

  • GitLab will ask you to confirm the deletion by typing the project’s name in a text box.

  • Enter the project name exactly as it appears to confirm that you want to delete it.

6. Confirm Deletion

  • After typing the project name, click on the Remove project button again.

  • A confirmation dialog will appear, telling you that deleting the project is permanent and cannot be undone.

  • Confirm the action by clicking Yes, remove project.

Important Notes:

  • Permanent Deletion: Once the project is deleted, it is permanently removed, and you will not be able to recover it unless you have a backup.

  • GitLab Groups: If the project belongs to a group, only a user with sufficient permissions (e.g., Maintainer or Owner) can delete it.

  • Backups: It’s a good idea to make a backup of your project before deleting it if you might need the data later.

Alternative Method via GitLab API (for Advanced Users)

You can also delete a project using GitLab's API if you prefer a programmatic approach:

  • Use the DELETE method on the following endpoint:

    DELETE /projects/:id

    Replace :id with the project ID or URL-encoded name.

    Example:

    curl --header "PRIVATE-TOKEN: <your_private_token>" \ --request DELETE "https://gitlab.example.com/api/v4/projects/123"

    Where <your_private_token> is your personal access token and 123 is the project ID.

This approach is useful if you're dealing with a large number of projects or automating tasks.

By following these steps, you'll be able to delete a project in GitLab safely. Just remember that this action is irreversible, so double-check that you really want to remove the project before confirming!

Soeng Souy

Soeng Souy

Website that learns and reads, PHP, Framework Laravel, How to and download Admin template sample source code free.

1 Comments

CAN FEEDBACK
  1. Anonymous
    Anonymous
    thank bro
close