---
title: "Delete a repository"
method: DELETE
path: "/repositories/{workspace}/{repo_slug}"
tags: ["Repositories"]
---

# Delete a repository

`DELETE /repositories/{workspace}/{repo_slug}`

## Request

- Base URL: `https://api.bitbucket.org/2.0`
- URL: `https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}`
- Auth: one of:
  - OAuth 2
    - Authorization code: `https://bitbucket.org/site/oauth2/authorize`
    - Token URL: `https://bitbucket.org/site/oauth2/access_token` scopes: `repository:delete`
  - HTTP basic
  - API key in header `Authorization`

Deletes the repository. This is an irreversible operation.

This does not affect its forks.

## Query parameters

- `redirect_to` string

## Response `204`

Indicates successful deletion.

## Other responses

- `403`: If the caller either does not have admin access to the repository, or the repository is set to read-only.
- `404`: If the repository does not exist.

---

[API](https://skmtc.dev/atlassian/apis/bitbucket-api.md) - [All operations](https://skmtc.dev/atlassian/apis/bitbucket-api/llms.txt) - [OpenAPI document](https://skmtc.dev/atlassian/apis/bitbucket-api/revisions/6ae783fa75da?raw)
