# Uninstall

## Remove one folder

To stop indexing one repo and free its lines, without removing Niro:

```
niro plan remove ~/code/old-service

```

Its graph is deleted; the folder and your code are not touched. Run `niro init` in it later to index it again.

## Remove Niro from this machine

```
niro uninstall

```

It lists what it will remove and asks first (`--yes` skips the question, for scripts):

- **Niro's entries in your AI assistants' settings**, for every assistant `niro mcp install` configured: the `niro` MCP server, the Niro skills (`niro-skill`, `niro-local`), the hooks, and the Niro section in files such as `~/.claude/CLAUDE.md`. Your own settings are left as they were.

- **The background watcher** (`niro-watch` in PM2). What happens to PM2's own start-at-login entry depends on your computer. If PM2 still runs other programs, the entry is kept, because it is not Niro's. On macOS, with nothing else in PM2, it is removed. Otherwise (on Linux), removing it needs administrator rights, so the uninstall prints the command for you to run.

- **`~/.niro`**: your sign-in, settings and the local engine.

- **`~/.niro-local`**: the list of indexed folders and every graph (`graph.db`).

A step that fails is reported and the others still run. Then remove the command itself:

```
npm uninstall -g @niroai/niro

```

Restart your assistants so they stop loading the removed entries.

## Remove only the assistant connection

To keep the graphs but disconnect an assistant:

```
niro mcp uninstall --client claude-code     # one assistant
niro mcp uninstall --all                    # every assistant

```

## By hand, if `niro` will not run

- Assistant settings. For Claude Code: `claude mcp remove niro --scope user`, then delete `~/.claude/skills/niro-skill` and `~/.claude/skills/niro-local`, and remove the block starting with the Niro marker from `~/.claude/CLAUDE.md`. Other assistants: remove the `niro` server from their MCP settings, and delete `~/.agents/skills/niro-skill` and `~/.agents/skills/niro-local`.

- The watcher: `pm2 delete niro-watch && pm2 save`.

- The data: `rm -rf ~/.niro ~/.niro-local`.

- The command: `npm uninstall -g @niroai/niro`.

## Your account

Uninstalling removes Niro from this machine only; your Niro account stays. If you turned on code sharing, turn it off under Settings, Privacy in the console first, so no machine you use can send a whole repository any more. With sharing off, this still leaves a machine where Niro is installed. Your code stays on this machine, except, for each line the audit flags, the whole method that holds it and one line for each name it uses, sent with secrets masked and author and company names removed. A record of which Niro tools your assistant used is also sent, to improve Niro and to show you its value. Niro's tools answer your assistant from the graph on this machine and never send the contents of your files.