A comprehensive uninstall/cleanup script for Beads (bd) that removes all traces of the tool from a system.
Usage #
./scripts/uninstall.sh # dry-run (scan $HOME)
./scripts/uninstall.sh --apply # perform cleanup
./scripts/uninstall.sh --root DIR --apply
./scripts/uninstall.sh --skip-home --skip-binary
Key Features #
- Dry-run by default - Shows what would be deleted without making changes. Use
--applyto actually perform cleanup.
What It Cleans Up #
Per-Repository Cleanup
- Stops any running bd daemon
- Removes
.beads/and.beads-hooks/directories - Cleans Beads integration from
AGENTS.md(removes marked sections) - Removes bd hooks from
.claude/settings.local.jsonand.gemini/settings.json - Deletes
.cursor/rules/beads.mdc,.aider.conf.yml,.aider/BEADS.md - Cleans git hooks that contain bd-related code, restoring backups if they exist
- Removes
merge=beadsfrom.gitattributes - Cleans Beads entries from
.git/info/exclude - Unsets
core.hooksPathif it points to.beads-hooks - Removes merge driver config (
merge.beads.*)
Home Directory Cleanup
- Removes
~/.beads/and~/.config/bd/ - Cleans hooks from
~/.claude/settings.jsonand~/.gemini/settings.json - Removes Beads entries from global gitignore
- Removes
~/.beads-planning/if it has a.beadssubdirectory
Binary Cleanup
- Removes
bdbinaries from common locations (/usr/local/bin,/opt/homebrew/bin,~/.local/bin,~/go/bin) - Runs
brew uninstall bdif installed via Homebrew - Runs
npm uninstall -g @beads/bdif installed via npm
Options #
| Flag | Description |
|---|---|
--apply |
Actually perform deletions (otherwise dry-run) |
--root DIR |
Scan a specific directory instead of $HOME (repeatable) |
--skip-home |
Don't touch home-level files |
--skip-binary |
Don't remove the bd binary |
-h, --help |
Show help |
Examples #
./scripts/uninstall.sh
./scripts/uninstall.sh --apply
./scripts/uninstall.sh --root ~/myproject --skip-home --skip-binary --apply
./scripts/uninstall.sh --root ~/project1 --root ~/project2 --apply