---
title: "Delete Public Repo"
method: DELETE
path: "/admin/repos/{repo_id}"
tags: ["admin"]
---

# Delete Public Repo

`DELETE /admin/repos/{repo_id}`

Delete a public repo and everything derived from it, for everyone.

This is not the per-user unlink at ``DELETE /repos/{id}``. It removes the
shared repo row, so Postgres cascades away every user's library entry, every
workspace membership, every team share, and every snapshot. People who did
not ask for this lose the repo from their dashboard.

Which is why ``confirm`` has to spell out ``owner/name``, why the affected
counts are read before the cascade destroys them, and why the audit row is
written *before* the purge rather than after.

Refuses while an index is in flight. Deleting mid-run cascades away the
``snapshots`` row while the Modal container is still uploading to its
prefix, and anything it writes to R2 after that point is unreachable
forever, since nothing sweeps R2 orphans.

## Path parameters

- `repo_id` string, required

## Query parameters

- `confirm` string, required — Must equal the repo's owner/name. Guards against a mis-click.

## Response `200`

Successful Response

- AdminDeleteResponse
  - `ok` boolean
  - `repo_slug` string, required
  - `snapshots_deleted` integer
  - `storage_objects_removed` integer
  - `r2_objects_removed` integer
  - `linked_users_removed` integer
  - `workspaces_affected` integer
  - `teams_affected` integer

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/repowise/apis/repowise-hosted-api.md) · [All operations](https://skmtc.dev/repowise/apis/repowise-hosted-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/repowise/repowise-hosted-api/revisions/1e57283a9737/schema)
