[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[],[],null,["# Delete a repository\n\nRequired roles\n--------------\n\n\nTo get the permissions that\nyou need to delete a repository,\n\nask your administrator to grant you the\nfollowing IAM roles:\n\n- [Secure Source Manager Instance Accessor](/iam/docs/roles-permissions/securesourcemanager#securesourcemanager.instanceAccessor) (`roles/securesourcemanager.instanceAccessor`) on the Secure Source Manager instance\n- [Secure Source Manager Repo Admin](/iam/docs/roles-permissions/securesourcemanager#securesourcemanager.repoAdmin) (`roles/securesourcemanager.repoAdmin`) on the repository\n\n\nFor more information about granting roles, see [Manage access to projects, folders, and organizations](/iam/docs/granting-changing-revoking-access).\n\n\nYou might also be able to get\nthe required permissions through [custom\nroles](/iam/docs/creating-custom-roles) or other [predefined\nroles](/iam/docs/roles-overview#predefined).\n\nFor information on granting Secure Source Manager roles,\nsee [Access control with IAM](/secure-source-manager/docs/access-control) and\n[Grant users instance access](/secure-source-manager/docs/grant-users-instance-access).\n\nDelete a repository\n-------------------\n\nTo delete your repository and all associated data, use the following HTTP\nmethod and URL.\n\n\nBefore using any of the request data,\nmake the following replacements:\n\n- \u003cvar class=\"edit\" scope=\"PROJECT_ID\" translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the [project ID](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) of the Google Cloud project where Secure Source Manager is running.\n- \u003cvar class=\"edit\" scope=\"LOCATION\" translate=\"no\"\u003eLOCATION\u003c/var\u003e: the region where your instance is located. For information on supported locations, see [Locations](https://cloud.google.com/secure-source-manager/docs/locations).\n- \u003cvar class=\"edit\" scope=\"REPOSITORY_ID\" translate=\"no\"\u003eREPOSITORY_ID\u003c/var\u003e: the repository ID.\n\n\nHTTP method and URL:\n\n```\nDELETE https://securesourcemanager.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/repositories/REPOSITORY_ID\n```\n\nTo send your request, expand one of these options:\n\n#### curl (Linux, macOS, or Cloud Shell)\n\n| **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login) , or by using [Cloud Shell](/shell/docs), which automatically logs you into the `gcloud` CLI . You can check the currently active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\n\nExecute the following command:\n\n```\ncurl -X DELETE \\\n -H \"Authorization: Bearer $(gcloud auth print-access-token)\" \\\n \"https://securesourcemanager.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/repositories/REPOSITORY_ID\"\n```\n\n#### PowerShell (Windows)\n\n| **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login) . You can check the currently active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\n\nExecute the following command:\n\n```\n$cred = gcloud auth print-access-token\n$headers = @{ \"Authorization\" = \"Bearer $cred\" }\n\nInvoke-WebRequest `\n -Method DELETE `\n -Headers $headers `\n -Uri \"https://securesourcemanager.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/repositories/REPOSITORY_ID\" | Select-Object -Expand Content\n```\n\nYou should receive a JSON response similar to the following:\n\n````\n\"name\":\"operations/cc3ea26c-9b57-11ed-be0a-2e3b5910efef\",\"metadata\":{\"@type\":\"type.googleapis.com/google.cloud.securesourcemanager.v1.OperationMetadata\",\"createTime\":\"2023-01-23T19:54:49.904779921Z\",\"endTime\":\"2023-01-23T19:54:50.947030402Z\",\"target\":\"projects/my-project/locations/us-central1/repositories/my-repo\",\"verb\":\"delete\",\"apiVersion\":\"v1\"},\"done\":true,\"response\":{\"@type\":\"type.googleapis.com/google.protobuf.Empty\"}\n```\n````\n\nWhat's next\n-----------\n\n- [Disable the Secure Source Manager API](/secure-source-manager/docs/enable-disable#disable).\n- [Delete a Secure Source Manager instance](/secure-source-manager/docs/delete-instance).\n- [List and view instances](/secure-source-manager/docs/list-view-instances)."]]