feat: add uninstall.sh to reverse setup.sh#23
feat: add uninstall.sh to reverse setup.sh#23tripathiprateek wants to merge 1 commit intonicedreamzapp:mainfrom
Conversation
Removes MLX venv, server dir, desktop launcher, phone scripts, and optionally downloaded models. Leaves shared tools (Homebrew, Python, Claude CLI) untouched. Usage: bash uninstall.sh [--keep-models] Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
nicedreamzapp
left a comment
There was a problem hiding this comment.
Thanks for the PR — the structure and --keep-models flag are both good calls. A few things before this can merge:
Blocker: phone scripts aren't necessarily this project's to delete
setup.sh copies the iMessage scripts into ~/.claude/ from scripts/ in this repo. But plenty of users already have those scripts in ~/.claude/ from other sources (they're part of a broader personal iMessage/remote-control system, not strictly tied to this project). Right now uninstall.sh will nuke them regardless — that's a foot-gun.
Options:
- Cheapest: prompt before deleting (
Delete iMessage scripts from ~/.claude/? [y/N]) with a default-no. - Better: only delete if the file in
~/.claude/<name>is byte-identical toscripts/<name>in this repo (i.e. setup.sh put it there).cmp -sworks fine for this.
set -e should come off
For an uninstaller you want best-effort cleanup. If any rm trips (permission, race, whatever), set -e aborts the script and leaves the rest of the state half-removed. Drop it, or trap errors and keep going.
Model deletion should confirm by default
Deleting 18-75 GB silently is a lot. Suggest flipping the default: require --delete-models (or prompt interactively) and treat --keep-models as the default. At minimum, prompt unless -y.
Hardcoded model list will drift
If setup.sh adds or renames a model tier, the uninstaller silently skips it. Could glob (models--mlx-community--Qwen*, models--divinetribe--gemma*) or list dirs matching a known prefix set. Minor — but it'll bite within a release or two.
Missed: scripts/config.sh
setup.sh copies config.example.sh → scripts/config.sh inside the repo on first run. Worth removing that too (or noting it's preserved since it may have user edits).
Test plan
The checkboxes are empty — have you actually run both directions on a fresh Mac? That'd be the quickest way to surface whatever else I missed.
Happy to merge once the phone-scripts behavior is safe and set -e is out. The rest is polish.
Summary
uninstall.shthat cleanly reverses everythingsetup.shcreates--keep-modelsflag to preserve them)Usage
Test plan
bash setup.shon a fresh Mac, verify artifacts createdbash uninstall.sh --keep-models, verify everything removed except modelsbash uninstall.shon a setup with models, verify models deletedbash uninstall.shwith no prior setup, verify graceful no-ops