How to Uninstall Agent-Reach with the `--keep-config` Option

Run agent-reach uninstall --keep-config to remove all executable binaries and skill integrations while preserving your API keys, tokens, and config.yaml in the ~/.agent-reach/ directory.

The Panniantong/Agent-Reach project provides an open-source CLI tool that installs skill files and helper scripts across your system. When you need to trigger the uninstall process for Agent-Reach with the --keep-config option, you can remove all executable components while preserving your API keys and configuration files intact.

What the Uninstall Command Does

The uninstall logic, implemented in agent_reach/cli.py, specifically targets files created during installation while respecting the --keep-config flag to protect user data.

Skill File Removal via _uninstall_skill()

The _uninstall_skill() function deletes the SKILL.md directory and associated metadata from every known agent installation location:

  • ~/.agents/skills/agent-reach/
  • ~/.openclaw/skills/agent-reach/
  • ~/.claude/skills/agent-reach/

This elimination happens recursively, removing the Agent-Reach integration from OpenClaw, Claude Code, and generic agent frameworks without touching other skills.

Tool Binary Cleanup

The command removes all executable files and helper scripts stored under ~/.agent-reach/tools/, including:

  • Xiaoyuzhou transcription scripts
  • OpenCLI helper utilities
  • Platform-specific automation binaries

Configuration Preservation

When you include the --keep-config flag, the _cmd_uninstall routine (located around line 1589 in agent_reach/cli.py) explicitly skips the deletion of the ~/.agent-reach/ directory. This preserves:

  • config.yaml – the central configuration file managed by agent_reach/config.py
  • Authentication tokens (e.g., Twitter auth_token/ct0, YouTube cookies)
  • API keys for Groq, OpenAI, and other services
  • Private cookie files like xhs-cookies.json

Step-by-Step Uninstall Instructions

Follow these steps to safely remove Agent-Reach while keeping your configuration intact.

1. Preview Changes with --dry-run

Before deleting anything, verify what the uninstaller will remove:

agent-reach uninstall --keep-config --dry-run

This outputs the list of files and directories targeted for deletion without making actual changes to your system.

2. Execute the Uninstall Command

Run the actual uninstall command:

agent-reach uninstall --keep-config

This invokes _cmd_uninstall, which calls _uninstall_skill() and scrubs the ~/.agent-reach/tools/ directory while leaving your configuration folder untouched.

Key Source Files Involved

The uninstall process relies on specific modules within the repository:

  • agent_reach/cli.py – Contains the _cmd_uninstall function that orchestrates the removal process and parses the --keep-config flag.
  • agent_reach/utils/paths.py – Provides make_private_dir() and other path utilities used to locate the ~/.agent-reach/ configuration directory.
  • agent_reach/config.py – Manages the config.yaml file that remains untouched when the preserve flag is active.

Summary

  • Use agent-reach uninstall --keep-config to remove the tool while saving your settings.
  • The --dry-run flag lets you preview deletions before they execute.
  • The process removes skill files from ~/.agents/, ~/.openclaw/, and ~/.claude/ directories via _uninstall_skill().
  • Tool binaries under ~/.agent-reach/tools/ are deleted, but the configuration directory remains intact.
  • System dependencies like gh, node, or mcporter are never touched by the uninstaller.

Frequently Asked Questions

What exactly gets deleted when I use --keep-config?

The uninstaller removes the SKILL.md directories from your agent skill folders (~/.agents/skills/agent-reach, ~/.openclaw/skills/agent-reach, ~/.claude/skills/agent-reach) and deletes all files under ~/.agent-reach/tools/. Your ~/.agent-reach/ directory itself, including config.yaml and any stored tokens or cookies, remains completely untouched according to the logic in agent_reach/cli.py.

How do I completely remove Agent-Reach including all my data?

Omit the --keep-config flag and run agent-reach uninstall. This triggers the full deletion of the ~/.agent-reach/ directory, removing config.yaml, API keys, and all cached authentication tokens alongside the tool binaries and skill files.

Does the uninstall process remove system-wide dependencies?

No. The uninstaller specifically targets files and directories created by Agent-Reach itself. It does not remove system packages such as gh (GitHub CLI), node (Node.js), or mcporter that may have been installed separately on your system.

Where does Agent-Reach store my configuration files?

According to agent_reach/utils/paths.py, the configuration directory is located at ~/.agent-reach/ on Unix-like systems. This location contains config.yaml, token files, and cookie stores that the --keep-config flag protects during the uninstall process.

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 →