---
title: "Remove a library"
method: DELETE
path: "/v2/teamspaces/{teamspaceId}/libraries/{owner}/{repo}"
tags: ["Teamspace Libraries"]
---

# Remove a library

`DELETE /v2/teamspaces/{teamspaceId}/libraries/{owner}/{repo}`

## Request

- Base URL: `https://context7.com/api`
- URL: `https://context7.com/api/v2/teamspaces/{teamspaceId}/libraries/{owner}/{repo}`
- Auth: HTTP bearer

For a private source: remove it from the teamspace; Context7 deletes it when no other teamspace has it. For a claimed public library: give up the claim; the library stays on Context7. Needs the owner or admin role.

## Response `200`

Removed

- object
  - `success` boolean, required
  - `message` string, required
  - `repoId` string: Private sources: the removed row.
  - `libraryId` string: Private sources: the library id.

## Other responses

- `401`: Unauthorized - Invalid or missing API key
- `403`: The caller cannot access this teamspace, the API key belongs to another teamspace, or the caller's role is too low
- `404`: The teamspace has no library with this id (neither claimed nor one of its private sources)
- `500`: Internal Server Error

## Changes

- **2026-10-22** `e17589fd8767`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/context7/apis/context7-public-api/changes/v2/teamspaces/:teamspaceId/libraries/:owner/:repo/delete.md)

---

[API](https://skmtc.dev/context7/apis/context7-public-api.md) - [All operations](https://skmtc.dev/context7/apis/context7-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/context7/apis/context7-public-api/revisions/945f7834fa8c?raw)
