# Delete a repository

From **GitHub v3 REST API**.

`DELETE /repos/{owner}/{repo}`

Deleting a repository requires admin access. If OAuth is used, the `delete_repo` scope is required.

If an organization owner has configured the organization to prevent members from deleting organization-owned
repositories, you will get a `403 Forbidden` response.

## Parameters

### `owner`

- Location: path
- Required: true
- Type: `string`

### `repo`

- Location: path
- Required: true
- Type: `string`

## Responses

### `204`

Response

### `307`

Temporary Redirect

### `application/json`

- Type: `object`

Basic Error

```json
{"description":"Basic Error","properties":{"documentation_url":{"type":"string"},"message":{"type":"string"},"status":{"type":"string"},"url":{"type":"string"}},"title":"Basic Error","type":"object"}
```

### `403`

If an organization owner has configured the organization to prevent members from deleting organization-owned repositories, a member will get this response:

### `application/json`

- Type: `object`

```json
{
  "documentation_url": "https://docs.github.com/enterprise-server@3.0/rest/reference/repos#delete-a-repository",
  "message": "Organization members cannot delete repositories."
}
```

```json
{"properties":{"documentation_url":{"type":"string"},"message":{"type":"string"}},"type":"object"}
```

### `404`

Resource not found

### `application/json`

- Type: `object`

Basic Error

```json
{"description":"Basic Error","properties":{"documentation_url":{"type":"string"},"message":{"type":"string"},"status":{"type":"string"},"url":{"type":"string"}},"title":"Basic Error","type":"object"}
```

## Request examples

### cURL

```shell
curl --request DELETE \
  --url {protocol}://{hostname}/api/v3/repos/{owner}/{repo}
```
