Deleting repositories

This topic describes how to delete a repository by using the Google Cloud console or the command line.

To delete a repository, follow these steps.

console

  1. In the Google Cloud console, open the All repositories page for Cloud Source Repositories.

    Open Cloud Source Repositories

  2. Hold the pointer over the repository you want to delete and click Settings .

    The General settings page opens.

  3. Click Delete this repository .

    The Remove repository dialog opens.

  4. Type the name of the repository you want to delete.

  5. Click Delete.

gcloud

From a terminal window, enter the following commands:

gcloud init
gcloud source repos delete [REPOSITORY_NAME]

Where [REPOSITORY_NAME] is the name of your repository.

The response looks like the following:

If [REPOSITORY_NAME] is deleted, the name cannot be reused for up to
seven days.

Delete "[REPOSITORY_NAME]" in project "gcloud-test" (Y/n)?  y

Deleted [REPOSITORY_NAME].