Files
omarchy/bin/omarchy-remove-ai-claude
T
e3392ef76f Quit the running Claude app before removing it
Electron rewrites ~/.config/Claude for as long as the app runs, so removing the package and deleting the directory while it is open leaves the app running and the directory back within the same second, holding fresh Preferences and crash-reporter state. Driven end to end on an edge worker: remove via the menu with the app open left 11 processes and a recreated ~/.config/Claude; with the app quit first the directory stayed gone. The test stubs pkill so the suite cannot take a developer's own Claude with it, and asserts the remover reached for it.

Co-Authored-By: Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Codex XHigh <noreply@openai.com>
2026-09-10 19:26:34 -05:00

24 lines
783 B
Bash
Executable File

#!/bin/bash
# omarchy:summary=Remove the Claude desktop app along with its configuration and caches.
# omarchy:requires-sudo=true
# -u so an unset HOME is an error rather than a set of rm -rf paths rooted at /.
set -euo pipefail
# The app rewrites ~/.config/Claude for as long as it runs, so a removal that
# leaves it running deletes the directory and watches it come straight back.
pkill -x claude-desktop || true
omarchy-pkg-drop claude-desktop
# Not ~/.claude, ~/.claude.json, or ~/.cache/claude-cli-nodejs: those belong
# to the Claude Code CLI, which ships in a different package that survives
# this one. The desktop app keeps its state in its own Electron directories.
rm -rf \
"$HOME/.config/Claude" \
"$HOME/.cache/Claude"
echo ""
echo "Claude has been removed."