# ox uninstall (https://sageox.ai/docs/cli/uninstall)

# ox uninstall

Completely remove SageOx from the current repository: the `.sageox` directory, git hooks, and agent integration files.

<Callout type="warn">
  This is a destructive operation and cannot be undone.
</Callout>

## Usage

<Terminal>
  <TerminalCommand>ox uninstall</TerminalCommand>
</Terminal>

## What it removes

1. The `.sageox/` directory and all its contents
2. Git hooks (`prepare-commit-msg` and others)
3. Agent integration files (`.claude/settings.json` and similar)
4. The `ox agent prime` entry from `AGENTS.md` / `CLAUDE.md`
5. User-level integration hooks, when `--user-integrations` is set

Files tracked in git are unstaged but left in the working tree unless you explicitly request their removal.

If several endpoints are configured, you can pick which one to uninstall from, or pass `--all` to remove them all.

## Examples

Preview the changes without touching anything:

<Terminal>
  <TerminalCommand>ox uninstall --dry-run</TerminalCommand>
</Terminal>

Remove from every configured endpoint without a prompt:

<Terminal>
  <TerminalCommand>ox uninstall --all --force</TerminalCommand>
</Terminal>

## Flags

| Flag | Description |
|------|-------------|
| `--all` | Uninstall from all configured endpoints |
| `--dry-run` | Preview what would be removed without making changes |
| `--force` | Skip the confirmation prompt for non-interactive use |
| `--local-only` | Skip the cloud notification (doesn't require login, but cloud resources won't be cleaned up) |
| `--user-integrations` | Also remove user-level integration hooks |

## What's next

- [ox init](/docs/cli/init) - Set SageOx back up in a repository
- [ox doctor](/docs/cli/doctor) - Verify the repository's SageOx state
