How to Uninstall Agent Reach Completely While Preserving Configuration

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 and handles the complete teardown of the tool. By default, it deletes the ~/.agent-reach directory containing your 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 (lines 1321–1400) targets three specific areas:

  1. Configuration directory: The ~/.agent-reach folder containing 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:

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:

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:

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:

pip uninstall agent-reach

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

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:


# 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 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, 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. 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. Preserving this file during uninstallation allows you to maintain your authentication state across reinstallations.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →