Skip to content

bug(install): install.sh --uninstall is a no-op from a checkout and never removes copy-mode channels #219

Closed

Description

@danielvm-git

Fix order: 9 (after #208/#209) · Severity: P1 · Measured on a real dev machine · Related: #208, #214

Symptom

bash scripts/install.sh --uninstall run from a checkout removes nothing and exits 0. On this machine it left 635 installed entries plus a 62 MB copy tree behind; every one had to be removed by hand.

$ bash scripts/install.sh --uninstall
bigpowers install.sh — REPO: /Users/danielvm/Developer/bigpowers
pi → removing management from /Users/danielvm/.pi/
  (no output, nothing removed)

Root cause 1 — prefix mismatch makes uninstall a no-op whenever the repo is not the install source

scripts/install.sh:63-72:

unlink_if_managed() {
  [[ -L "$dst" ]] || return
  local target; target="$(readlink "$dst")"
  if [[ "$target" == "$src_prefix"* ]]; then rm "$dst"; fi   # src_prefix = $REPO_ROOT/
}

Every channel entry points at …/lib/node_modules/bigpowers/skills/<name> (npm install) or at ~/Developer/bigpowers/skills/<name> (checkout install). Running uninstall from the other tree matches no prefix, so all links survive. Nothing reports "0 removed of 85 linked" — the user believes the uninstall happened.

Actual targets found:

~/.claude/skills/audit-code  -> /Users/…/lib/node_modules/bigpowers/skills/audit-code
~/.pi/agent/skills/audit-code-> /Users/…/lib/node_modules/bigpowers/skills/audit-code
~/.agents/skills/audit-code  -> /Users/…/.claude/skills/audit-code        # chained hop

The chained .agents/skills → .claude/skills → node_modules hop is a second trap: even a prefix fix on .claude leaves .agents dangling.

Root cause 2 — only symlinks are ever considered

Leftover Kind Removed by any uninstall path?
~/.hermes/skills/bigpowers/ real dir, 62 MB copy tree no
~/.hermes/skills/<80 names> real copies (not links) no
~/.gemini/extensions/bigpowers/ empty dir no
~/.gemini/config/plugins/bigpowers/ real dir no
~/.cursor/rules/<name>.mdc real dirs, 80 no
~/Developer/bigpowers/.agents/skills/ render target in the repo no

uninstall_* functions only iterate "$X"/*/ and skip anything that is not -L. Copy-mode installs (Hermes, Cursor, Antigravity) are therefore permanently uninstallable by tool.

Fix direction

  • Match by resolved realpath, not by literal link text: follow the link chain (readlink -f on the parent when it is itself a link) and treat a target under $REPO_ROOT or under a node_modules/bigpowers root as managed.
  • Record what was installed: write ~/.bigpowers/install-manifest.json (channel, entry, mode, source root) at install time and have uninstall replay it. Removes all prefix guessing, handles copy mode, and makes bigpowers doctor (epic: bigpowers doctor — self-diagnose host integration defects #216) trivial.
  • Never render into the repo root (#209); and for copy-mode channels, mark entries with a sentinel file (<entry>/.bigpowers-managed) so copies are identifiable and removable.
  • Print a summary always: removed N of M entries; K kept (not managed).

Verify

bash scripts/install.sh                 # install
bash scripts/install.sh --uninstall     # must report "removed M of M", exit 0
for d in ~/.claude/skills ~/.pi/agent/skills ~/.agents/skills ~/.cursor/rules ~/.hermes/skills; do
  ls "$d" | grep -c . ; done            # back to the pre-install count, no dangling links

Activity

  1. added
    bug
    quality
    on Nov 6, 2026
  2. added a commit that references this issue on Nov 6, 2026
  3. github-actions commented on Nov 6, 2026

    @github-actions

    🎉 This issue has been resolved in version 2.93.7 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugqualityreleased

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions