YouTip LogoYouTip

Openclaw Uninstall

This tutorial describes how to completely uninstall OpenClaw, including the CLI, Gateway service, configuration files, and workspace data. There are two scenarios for uninstalling OpenClaw: * CLI still exists (recommended method) * CLI has been deleted but background services are still running (manual cleanup) * * * ## Recommended Method (CLI Still Exists) If the openclaw command can still be run in the system, it is recommended to use the built-in uninstall command. ### 1. Standard Uninstallation openclaw uninstall This command will delete: * Gateway service * Local state data * Configuration files * Agent working directory and other data ### 2. Non-interactive Uninstallation (Automated Scripts) Suitable for CI or automated script environments: # Execute directly openclaw uninstall --all --yes --non-interactive # No local CLI Hour,via npx execute npx -y openclaw uninstall --all --yes --non-interactive * uninstall: Uninstall the program * --all: Remove services and local data together (including gateway service, configuration files, database, etc.) * --yes: Auto-confirm, no longer requiring manual Y input repeatedly * * * ## Manual Uninstallation (Complete Cleanup) If you want full control over the uninstallation process, you can manually clean up following these steps. ### 1. Stop Gateway Service openclaw gateway stop ### 2. Uninstall Gateway Service openclaw gateway uninstall This step will delete the background service in the system: * macOS: launchd * Linux: systemd * Windows: Scheduled Tasks ### 3. Delete Configuration and State Directories rm -rf "${OPENCLAW_STATE_DIR:-$HOME/.openclaw}" Default directory: ~/.openclaw Which contains: * Configuration files * Token * Session * Logs * Agent state data If you have set custom environment variables: OPENCLAW_CONFIG_PATH You also need to manually delete the corresponding files. ### 4. Delete Agent Workspace (Optional) rm -rf ~/.openclaw/workspace This directory usually contains: * Code generated by Agent * Task execution files * Intermediate data ### 5 Delete CLI Choose the corresponding command based on your installation method: # npm Install npm rm -g openclaw # pnpm Install pnpm remove -g openclaw # bun Install bun remove -g openclaw ### 6. Delete macOS Application (if installed) rm -rf /Applications/OpenClaw.app * * * ## CLI Lost But Service Still Running If you have already deleted the CLI but the OpenClaw Gateway is still running in the background, you can manually delete the system service. ### 1. macOS (launchd service) Default service label: `bot.molt.gateway` (multiple configurations use `bot.molt.`, older versions use `com.openclaw.*`) # Stop and uninstall service launchctl bootout gui/$UID/bot.molt.gateway # Delete service configuration file rm -f ~/Library/LaunchAgents/bot.molt.gateway.plist # Multi-profile scenario: replace with the corresponding profile tag# launchctl bootout gui/$UID/bot.molt.# rm -f ~/Library/LaunchAgents/bot.molt..plist# Clean up legacy remnants (if any) rm -f ~/Library/LaunchAgents/com.openclaw.*.plist ### 2. Linux (systemd user service) Default service name: `openclaw-gateway.service` (multiple configurations use `openclaw-gateway-.service`) # Stop and disable service systemctl --user disable --now openclaw-gateway.service # Delete service configuration file rm -f ~/.config/systemd/user/openclaw-gateway.service # Refresh systemd configuration systemctl --user daemon-reload # Multi-profile scenario: replace with the corresponding profile service name# systemctl --user disable --now openclaw-gateway-.service# rm -f ~/.config/systemd/user/openclaw-gateway-.service# systemctl --user daemon-reload ### [](#)3. Windows (Scheduled Tasks) Default task name: `OpenClaw Gateway` (multiple configurations use `OpenClaw Gateway ()`) # Delete scheduled task schtasks /Delete /F /TN "OpenClaw Gateway"# Delete task scriptRemove-Item -Force "$env:USERPROFILE.openclawgateway.cmd"# Multi-profile scenario: replace with the corresponding profile task name# schtasks /Delete /F /TN "OpenClaw Gateway ()"# Remove-Item -Force "$env:USERPROFILE.openclaw-gateway.cmd" * * * ## Docker Installation Uninstallation Method If OpenClaw is running in Docker: docker stop openclaw docker rm openclaw docker volume rm openclaw-data or docker-compose down -v * * * ## Source Code Installation (git clone) Uninstallation If installed via `git clone` source code method, you need to clean up services first, then delete source code and configuration: 1. First execute "Recommended Uninstallation Method" or "Manual Service Cleanup
← Qoder Quick StartLua Editor β†’