# How to Uninstall Agent Reach Completely While Preserving Configuration

> Learn how to uninstall Agent Reach completely while preserving your critical configurations. Discover the simple uninstall process and the keep config flag for seamless reinstallation.

- Repository: [Pnant/Agent-Reach](https://github.com/Panniantong/Agent-Reach)
- Tags: how-to-guide
- Published: 2026-06-15

---

**Agent Reach ships a built-in uninstaller that removes every component it created—configuration files, credential stores, and skill registrations—while providing a `--keep-config` flag that preserves your saved tokens, cookies, and settings in `~/.agent-reach`.**

According to the Panniantong/Agent-Reach source code, the uninstaller is implemented in [`agent_reach/cli.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/cli.py) and handles the complete teardown of the tool. By default, it deletes the `~/.agent-reach` directory containing your [`config.yaml`](https://github.com/Panniantong/Agent-Reach/blob/main/config.yaml), but you can retain this data for future reinstallation using specific command-line flags.

## What the Uninstaller Removes

The `_cmd_uninstall` function in [`agent_reach/cli.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/cli.py) (lines 1321–1400) targets three specific areas:

1. **Configuration directory**: The `~/.agent-reach` folder containing [`config.yaml`](https://github.com/Panniantong/Agent-Reach/blob/main/config.yaml) with cookies, API keys, and proxy settings. The code uses `shutil.rmtree` to remove this directory at lines 1339–1350.
2. **Skill files**: Agent-specific registrations for OpenClaw, Claude Code, and generic `.agents` installations (lines 1360–1375).
3. **MCP entries**: Cleanup of mcporter configurations, such as the Exa search backend (lines 1378–1395).

By default, the uninstaller deletes everything, including your sensitive credentials.

## Preserving Configuration with Command Flags

The uninstaller accepts two critical flags defined in the argument parser at line 1321: `--dry-run` and `--keep-config`. When `args.keep_config` is true, the code skips the `shutil.rmtree` call for the configuration directory, leaving your authentication data intact while removing the application's functional components.

### Dry Run to Preview Changes

Before making changes, verify what will be deleted:

```bash
agent-reach uninstall --dry-run

```

This sets `args.dry_run` to true, causing the uninstaller to print a summary of targeted files without executing any deletions.

### Uninstall While Keeping Credentials

To remove Agent Reach but preserve your tokens and cookies:

```bash
agent-reach uninstall --keep-config

```

This command deletes skill registrations and MCP entries but retains the `~/.agent-reach` directory and its contents.

### Complete Removal Including Configuration

For a total wipe including all saved settings:

```bash
agent-reach uninstall

```

This executes the full deletion sequence, including the removal of `~/.agent-reach` via `shutil.rmtree(os.path.expanduser("~/.agent-reach"))`.

## Manual Cleanup After Uninstallation

The CLI uninstaller removes Agent Reach's operational files but does not uninstall the Python package itself. After running the uninstall command, complete the removal with:

```bash
pip uninstall agent-reach

```

Additionally, remove any globally-installed helper tools that were added separately:

```bash
npm uninstall -g mcporter
pipx uninstall twitter-cli
npm uninstall -g undici

```

## Reinstalling with Existing Configuration

Because the configuration persists in `~/.agent-reach`, you can reinstall later and automatically reuse your saved settings:

```bash

# After using --keep-config

agent-reach install --env=auto

```

The installer detects the existing configuration directory and reuses stored credentials without requiring re-authentication.

## Summary

- The uninstaller is implemented in [`agent_reach/cli.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/cli.py) at lines 1321–1400.
- Configuration lives in `~/.agent-reach/config.yaml` and is deleted by default via `shutil.rmtree`.
- Use `agent-reach uninstall --keep-config` to preserve tokens and cookies while removing skills.
- Use `agent-reach uninstall --dry-run` to preview changes without modifying files.
- After uninstalling, run `pip uninstall agent-reach` to remove the Python package itself.

## Frequently Asked Questions

### Does uninstalling Agent Reach delete my API keys?

By default, yes. The uninstaller deletes the entire `~/.agent-reach` directory containing [`config.yaml`](https://github.com/Panniantong/Agent-Reach/blob/main/config.yaml), which stores API keys, cookies, and proxy settings. To preserve these credentials, you must include the `--keep-config` flag when running the uninstall command.

### What is the difference between `--dry-run` and `--keep-config`?

The `--dry-run` flag simulates the uninstallation without making any changes, allowing you to see what would be deleted based on the logic in [`agent_reach/cli.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/cli.py). The `--keep-config` flag actually performs the uninstallation but skips the deletion of the `~/.agent-reach` directory, preserving your configuration files while removing skill registrations and MCP entries.

### Do I need to manually remove the Python package after running agent-reach uninstall?

Yes. The built-in uninstaller removes configuration files, skill registrations, and MCP entries, but it does not uninstall the Python package itself. After running `agent-reach uninstall`, you must execute `pip uninstall agent-reach` to complete the removal from your environment.

### Where does Agent Reach store my authentication tokens?

Authentication tokens, cookies, and proxy settings are stored in `~/.agent-reach/config.yaml`. This file is located in the `.agent-reach` directory within your home folder and is managed by the `Config` class in [`agent_reach/config.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/config.py). Preserving this file during uninstallation allows you to maintain your authentication state across reinstallations.