> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cognee.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Maintenance and Visualization

> Replace or prune stored data and render the knowledge graph to HTML with @cognee/cognee-ts.

## Maintenance operations

```ts theme={null}
// Replace a data item (delete → re-add → re-cognify)
await c.update("old-data-uuid", { type: "text", text: "updated content" }, "my-dataset");

// Remove all files from storage (metadata DB untouched)
await c.pruneData();

// Wipe graph, vector, metadata, and/or cache backends
await c.pruneSystem({ pruneGraph: true, pruneVector: true });
```

To remove memory by item or dataset rather than wiping backends, use `forget`
from the [Memory API](/typescript/memory-api).

## Visualisation

```ts theme={null}
// Get the HTML string
const html = await c.visualize();

// Write to a file (returns the absolute path)
const path = await c.visualizeToFile({ destinationPath: "/tmp/graph.html" });
```

Requires the `visualization` feature compiled into the native addon.
