---
title: "Delete ALL nodes and edges in a KG"
method: DELETE
path: "/api/v0/knowledge-graphs/{kg_id}/nodes"
tags: ["Knowledge Graphs"]
---

# Delete ALL nodes and edges in a KG

`DELETE /api/v0/knowledge-graphs/{kg_id}/nodes`

Clears the knowledge graph: every node and every edge — projected, bootstrapped, and manually created alike — is deleted. Documents, their visual components, and package subscriptions are untouched, so a subsequent initialize/project starts from a clean slate. If extraction provenance, current/historical claims, or resolutions exist, the request returns 409 unless discard_evidence=true explicitly permits their permanent deletion. Export an archive before discarding them.

## Path parameters

- `kg_id` string, uuid, required

## Query parameters

- `discard_evidence` boolean — Explicitly and permanently delete all extraction runs, extraction sources, current or historical attribute claims, and fact resolutions with the graph.

## Response `200`

Successful Response

- NodesDeleteAllResponse
  - `nodes_deleted` integer, required
  - `edges_deleted` integer, required

## Other responses

- `422` — Validation Error

---

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