# Method: projects.locations.connections.repositories.delete

- [HTTP request](https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories/delete#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories/delete#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories/delete#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories/delete#body.request_body)
- [Response body](https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories/delete#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories/delete#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories/delete#body.aspect_1)
- [Try it!](https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories/delete#try-it)

Deletes a single repository.

### HTTP request

`DELETE https://cloudbuild.googleapis.com/v2/{name=projects/*/locations/*/connections/*/repositories/*}`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. The name of the Repository to delete. Format: `projects/*/locations/*/connections/*/repositories/*`. |

### Query parameters

| Parameters ||
|---|---|
| `etag` | `string` The current etag of the repository. If an etag is provided and does not match the current etag of the repository, deletion will be blocked and an ABORTED error will be returned. |
| `validateOnly` | `boolean` If set, validate the request, but do not actually post it. |

### Request body

The request body must be empty.

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/build/docs/api/reference/rest/Shared.Types/Operation`.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://cloud.google.com/docs/authentication/).

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource:

- `cloudbuild.repositories.delete`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).