# Uninstall: remove repowise

Remove repowise from this repo, and optionally from this machine, with a full inventory of every path it wrote and a report of what was removed and kept.

Enumerates every path repowise has written for this repo
([agent wiring](https://docs.repowise.dev/cli/agents), generated blocks in `CLAUDE.md`/`AGENTS.md`,
the [repo index](https://docs.repowise.dev/installation/configuration), machine-wide
state like login and telemetry preference), then removes whatever scope you
choose. The report is the trust signal: it states exactly what was removed,
what was kept, and why, even when you keep the index.

```bash
repowise uninstall [PATH] [OPTIONS]
```

| Name | Type | Default | Description |
|---|---|---|---|
| `--all` | boolean | `false` | Remove everything, including the repo index and machine-wide state. |
| `--keep-index` | boolean | `false` | The reinstall case: remove agent wiring and generated blocks, keep the repo index and machine-wide state (login, caches). |
| `--dry-run` | boolean | `false` | Print the plan and change nothing. |
| `--format` | string | `table` | Output format. json reports the plan, every path, and what happened to it. |

```bash
repowise uninstall                    # interactive: shows the inventory, asks what to remove
repowise uninstall --all              # everything, including the index and login
repowise uninstall --keep-index       # everything except the index and machine-wide state
repowise uninstall --dry-run          # see the plan, remove nothing
repowise uninstall --all --format json
```

> **Warning**
>
> **There is no `--yes`.** Everywhere else in the CLI that flag means "run the
> default without asking", and there's no safe default here: running the
> default set when you meant to remove everything would be a partial
> uninstall, and removing everything by default would be a surprise deletion.
> Say what to remove instead: `--all` or `--keep-index`.

> **Note**
>
> **Consent is never inferred from a TTY probe.** `isatty` lies on Windows, and
> guessing wrong in either direction is bad: guessing "interactive" hangs,
> guessing "not interactive" deletes without asking. With no terminal and no
> scope flag, `uninstall` prints the inventory, removes nothing, and exits
> non-zero.

Four groups make up the inventory:

- **Agent configuration**: every wired agent, both project and user scope.
- **Generated blocks**: the managed sections in `CLAUDE.md` and `AGENTS.md`,
  and the post-commit auto-sync hook. Other tools' content in the same hook
  file stays.
- **Repo index**: `.repowise/`; rebuilding it costs a full re-index. An index
  held in a database through `REPOWISE_DB_URL` is listed and always kept.
- **Machine-wide state**: `~/.repowise/`, with login, caches, telemetry
  preference and the shared embedder key.

`--all` removes all four groups. `--keep-index` removes the first two. The
optional pre-commit security block (`repowise hook install --security`) is
not in the inventory: `repowise hook uninstall` removes it, together with the
post-commit hook.

The `repowise` package itself and the Claude Code plugin are owned by their
own installers (`pip`/`uv`/`pipx`, the
[Claude Code plugin](https://docs.repowise.dev/getting-started/plugins) marketplace), not by this
command. The report names the removal command for each. To remove the
package, use the installer you installed it with:

```bash
uv tool uninstall repowise   # uv
pipx uninstall repowise      # pipx
pip uninstall repowise       # pip
```

## Remove a workspace

`repowise uninstall` works on one repository. It leaves
`.repowise-workspace.yaml` and `.repowise-workspace/` in place, and run at a
workspace root its report says so. To remove a whole workspace:

1. From the workspace root, remove the hooks from every member repository:

   ```bash
   repowise hook uninstall --workspace
   ```

2. In each member repository, run `repowise uninstall --all` (or
   `--keep-index` to keep that repository's index).
3. At the workspace root, delete `.repowise-workspace.yaml` and the
   `.repowise-workspace/` directory. No command deletes them for you.

To take one repository out of a workspace and keep the rest, run
`repowise workspace remove <alias>` from inside the workspace. It drops the
entry from `.repowise-workspace.yaml` and leaves that repository's
`.repowise/` index on disk.
