Skip to content

manage purge is unreachable after manage uninstall (all three installers) #473

Description

@nedtwigg

manage uninstall prints:

Use "manage purge" separately to delete those irreversibly.

…and then deletes the directory holding manage. So the command the banner points at no longer exists: purge after uninstall is not merely out of order, it is unreachable. Recovering config/ and state/ afterwards means deleting them by hand, or reinstalling purely to get bin/manage back so it can be purged.

All three installers have it. Verified at f48c07f4:

banner says "use manage purge" deletion that removes bin manage written to
Linux install-linux.sh:1216 :1238 :741 (BIN_DIR at :466)
macOS install-macos.sh:965 :986 :562 (BIN_DIR at :266)
Windows install-windows.ps1:1750 :1779 :1841

Linux and macOS delete "$ROOT/releases" "$ROOT/current" "$ROOT/previous" "$ROOT/bin" "$ROOT/run"; Windows removes releases, bin, run via Remove-Tree. bin is manage's own home in each.

Why this isn't a one-line reorder

The closing install banner advertises

manage:  "<root>/bin/manage" <status|verify|logs|restart|show-password|serve|rollback|uninstall>

and omits purge — on all three (install-linux.sh:1343, install-macos.sh:1343, install-windows.ps1:2185; same omission in manage's own usage text at install-linux.sh:1609). The uninstall message is therefore the only place a user ever learns purge exists.

That makes the fix a judgment call rather than mechanical:

  • Reorder the message to "purge first, then uninstall" — trades the dead end for a discoverability gap, since the only mention of purge now appears after the point where it is still usable.
  • Preserve manage across uninstall (keep bin/, or leave a standalone purge shim) — keeps both reachability and discoverability, at the cost of uninstall no longer being a clean sweep of the install root.
  • Add purge to the advertised subcommand list — orthogonal to the above, and arguably wanted either way, though it does raise the prominence of the irreversible command.

Not proposing one here; it wants a call from someone who owns the operator-experience intent.

Notes

  • docs/specs/server.md -> "Installing it (behind Tailscale)" describes the operator surface as … uninstall, and the separately-confirmed purge, which is accurate about intent and silent about the ordering constraint. Whichever fix lands, that sentence and SELF_HOST.md checkpoint 5 ("manage uninstallmanage purge is the separate, irreversible operation") should say the order explicitly.
  • Since the three installers are bound together by scripts/deploy-lint.mjs, a fix touches all three and may warrant a lint rule so the banner and the deletion cannot drift apart again.
  • Found while running SELF_HOST.md end to end on Linux, in the same session as fix(deploy): make the Linux operator preflight actually detect the role #472 (which fixes an unrelated preflight bug). The teardown there only succeeded because purge happened to be run first.

🤖 Generated with Claude Code

https://claude.ai/code/session_01J1jDWEh3MTRaFTqmKPoJkK

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions