vault-sync-uninstall
Remove vault-sync from the current host. Stops scheduler jobs, removes deployed scripts and units, leaves tombstone markers for forensic traceability.
When to use
- Decommissioning vault-sync on a host
- Clean reinstall (uninstall then install)
- Removing a test installation
Steps
- Check installed state —
skillwiki config get vault_sync.installed. If false: exit 0 with message. - Stop + remove scheduler units:
- macOS:
launchctl bootout gui/$UID/<label>thenrm ~/Library/LaunchAgents/com.karlchow.wiki-*.plist. - Linux:
systemctl --user disable --now wiki-push.timer wiki-fetch.timer wiki-fuse-refresh.timerthen remove unit files.
- macOS:
- Create tombstone
*.RETIRED.mdnext to each removed unit (ADR D7 pattern):# RETIRED — com.karlchow.wiki-push - Retired: <ISO date> - Why: <reason from --reason flag, or "manual uninstall"> - Restore: claude plugin install vault-sync@llm-wiki && /vault-sync-install - Remove scripts:
rm -rf $(platform_share_dir)/bin - Unregister from skillwiki config:
skillwiki config set vault_sync.installed false --keep-logs(default): preservewiki-*.log.--purge: also remove logs.- Refuse to run on a host where
fleet.yamlmarks it asprotected: true. Override:--force-protected(sg01 hand-migration scenario only).
Guardrails
- Protected hosts (e.g., sg01) are refused by default.
--force-protectedis required for hand-migration. - Tombstones are always left (never purged) — they are forensic breadcrumbs for future debugging.
- Logs are preserved by default — they contain debugging information.
Execution
# Companion script (interactive)
bash packages/vault-sync/skills/vault-sync-uninstall/uninstall.sh --dry-run
bash packages/vault-sync/skills/vault-sync-uninstall/uninstall.sh --purge
bash packages/vault-sync/skills/vault-sync-uninstall/uninstall.sh --force-protected --reason \"manual host migration\"
# Companion script (headless / CI)
VS_DRY_RUN=1 VS_PURGE=0 bash packages/vault-sync/skills/vault-sync-uninstall/uninstall.sh