chainsaw uninstall-hook
Remove the chainsaw-managed block from a package manager
Remove the chainsaw-managed block from a package manager
chainsaw uninstall-hook [manager] [flags]
Delete the chainsaw-managed configuration block from a supported package manager’s user config file. Idempotent — exits 0 if no block is present.
If install-hook minted a client_credential for this manager, it is REVOKED
on the server once nothing is using it any more. Only credentials chainsaw
minted are ever revoked — a pair you supplied with –credentials is left
alone, and a credential install-hook --all shared across several managers
survives until the last of them is unwired. Pass –keep-credentials to skip
revocation entirely.
Removing the block is never blocked by this: unwiring needs no authentication,
and a revoke that is skipped or fails prints the exact
chainsaw auth client delete <id> command that finishes the job.
The timestamped .chainsaw.bak.* copies taken before each edit can still hold a previous plaintext client_id:client_secret. They are reported, not deleted — maven and nuget are restored FROM them. Pass –purge-backups to remove them once you no longer need the restore.
Examples: chainsaw uninstall-hook npm chainsaw uninstall-hook –all chainsaw uninstall-hook npm –keep-credentials chainsaw uninstall-hook npm –purge-backups
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--all | bool | — | Unwire every supported manager |
--keep-credentials | bool | — | Do not revoke the client_credential install-hook minted for this manager; leave it live on the server. |
--mirror | string | — | docker only: remove this exact registry-mirror URL. Needed on hosts wired before chainsaw recorded the mirror it inserted. |
--purge-backups | bool | — | Also delete the timestamped .chainsaw.bak.* copies of the config. They can hold a previous plaintext client_id:client_secret pair. Runs after the config is restored, so it is safe for maven/nuget. |
--repair | bool | — | Repair a config whose chainsaw markers are malformed (e.g. a hand-deleted end marker). Prints the exact lines it would delete and asks first. |
--scope | string | — | Which config to remove the block from: “user” (global) or “project” (current dir). Prompts when unset on a TTY, matching install-hook. |
The global flags apply here too.