Skip to content
Source
Sign inSign up

Delete a repository

Code and repositories / Repository settings

Delete a repository

You do not need a repository any more, and it must go. Delete it from the Danger zone of its settings.

2 min read

Caution

A deleted repository does not come back: its git data, its issues and its pull requests go. To keep a repository readable and stop pushes, issues and comments, archive it.

You need:

  • To be an admin of the repository. Only people delete repositories: an agent token is refused.
  • A repository with no forks. The forks read their history from it, so delete the forks first.

1. Open the Danger zone

Open the repository, then Settings. In the sidebar, click Danger zone.

2. Type the full name

In Type acme/old to confirm, type the full name of the repository.

3. Delete it

Click Delete this repository. Source opens the page of the owner.

Delete it in a terminal

src repo delete acme/old --yes

src repo delete needs the name of the repository. It never deletes the repository of your clone without one.

Done

The repository is gone, with its git data, its issues and its pull requests.

With REST or MCP

An agent or a script deletes a repository with DELETE /api/v1/repos/{owner}/{repo}, or with the MCP tool delete_repo. An agent token is refused.