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

> Remove Opsh from macOS or Linux, including the binary and shell rc integration, while keeping or fully deleting your configuration file.

# Uninstallation

Uninstalling Opsh removes the binary and cleans the shell integration out of your rc files. Your configuration is preserved by default so you can reinstall without reconfiguring. Choose the method that suits you best.

## Two ways to uninstall

**From inside the Opsh REPL**, type:

```text theme={null}
!uninstall
```

Opsh runs the uninstall script and then hands control back to your shell.

**From your terminal directly**, run the uninstall script:

```bash theme={null}
curl -fsSL https://opsh.dxu.one/uninstall.sh | bash
```

Both methods perform the same steps.

## What gets removed

* **`~/.opsh/bin/`** — the directory containing the `opsh` binary
* **`~/.opsh/install.sh` and `~/.opsh/uninstall.sh`** — the installer scripts cached in the Opsh directory
* **The `# >>> opsh initialize >>>` block** from your shell rc files — Opsh removes its managed startup block from `~/.zshrc`, `~/.bashrc`, `~/.bash_profile`, and `~/.profile` if they exist

## What is kept

* **`~/.opsh/config.json`** — your configuration file (provider, API key, model, and all settings) is preserved so you can reinstall without setting up from scratch
* **The `~/.opsh/` directory** — if `config.json` or any other files remain, the directory itself is not deleted

## Fully removing all Opsh data (NOT RECOMMENDED)

If you want to delete your configuration as well and remove the `~/.opsh/` directory entirely, run:

```bash theme={null}
rm -rf ~/.opsh
```

<Note>
  After uninstalling, open a new terminal session for the PATH change to take effect. The `opsh` command will no longer be available in terminals opened after that point.
</Note>
