# Remove a repository from a team (Legacy)

From **GitHub v3 REST API**.

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

**Deprecated.**

**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/enterprise-server@3.0/rest/reference/teams#remove-a-repository-from-a-team) endpoint.

If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team.

## Parameters

### `team_id`

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

### `owner`

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

### `repo`

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

## Responses

### `204`

Response

## Request examples

### cURL

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