Skip to content
$ shellfirm
Getting Started

Uninstall

Uninstall shellfirm completely — remove the shell hooks, agent integrations, the binary, settings and the audit log.

To uninstall shellfirm completely, follow these steps in order. Each step is independent, so you can also stop after removing only the hooks.

Remove the shell hooks

shellfirm init --uninstall --dry-run   # preview
shellfirm init --uninstall             # remove the hooks from your rc files
Output
shellfirm — removing the shellfirm hooks

  ✓ bash         → /home/dev/.bashrc (hook removed)

Removed hooks from 1 shell(s).
Restart your shells to deactivate.

init --uninstall removes the hook of your current shell. Add --all to remove the hooks of every shell. It does not ask before removing.

  • A hook line you added by hand in bash, zsh, fish or Oils (eval "$(shellfirm init bash)", shellfirm init fish | source) is removed too.

  • Any other line that still loads shellfirm is reported, for you to remove by hand:

    Output
      note: /home/dev/.xonshrc line 1: still loads shellfirm (`execx($(shellfirm init xonsh))`); remove it by hand.
  • A hook you saved by hand for nushell (source ~/.config/nushell/shellfirm.nu) or PowerShell (a dot-sourced shellfirm.ps1, or the hook pasted into $PROFILE without the # Added by shellfirm init markers) is neither removed nor reported, and shellfirm status does not list it. Remove it by hand: delete the source / dot-source line (or the pasted block) and the saved file. See Add the hook by hand.

  • Your settings file is kept, with one exception: the default file that shellfirm init --yes wrote (only min_severity: Medium) is removed with the last hook. Settings you chose in the init questions or changed later stay. See the last step to delete them.

Remove agent integrations

If you connected an AI tool:

shellfirm connect claude-code --uninstall
shellfirm connect cursor --uninstall
shellfirm connect codex --uninstall      # and gemini, qwen, copilot, windsurf, cline, opencode, zed

Only shellfirm's entries are removed. The rest of the agent's configuration is kept.

--uninstall looks only at the scope you give it (user scope by default). For hooks you installed in a repository with --scope project, run it there with the same scope, then commit the change:

shellfirm connect claude-code --uninstall --scope project   # .claude/settings.json, .mcp.json
shellfirm connect cursor --uninstall --scope project        # .cursor/hooks.json, .cursor/mcp.json

If you ran shellfirm sandbox, remove its entries per agent and scope:

shellfirm sandbox claude-code --remove                   # ~/.claude/settings.json
shellfirm sandbox claude-code --remove --scope project   # .claude/settings.json
shellfirm sandbox codex --remove                         # ~/.codex/config.toml

The agent's sandbox settings you had before stay as they were.

Restart open shells and confirm

A running shell keeps the hook until it exits, so restart open shells (exec bash, exec zsh, exec fish, …) and agent sessions. Then check:

shellfirm status
Output
Shell hooks:
  bash        not installed               /home/dev/.bashrc <- current shell
  zsh         not installed               /home/dev/.zshrc
  fish        not installed (no rc file)  /home/dev/.config/fish/config.fish

status reads your rc files, so it shows "not installed" right away, even for a shell that has not been restarted yet.

Remove the binary

Use the method you installed with:

npm uninstall -g @shellfirm/cli
brew uninstall shellfirm
cargo uninstall shellfirm

Delete settings and the audit log (optional)

Your settings, custom checks and audit log stay on disk. Delete them if you no longer need them:

rm -rf ~/.config/shellfirm                          # Linux
rm -rf ~/Library/Application\ Support/shellfirm     # macOS

On Windows the folder is %APPDATA%\shellfirm. If you set SHELLFIRM_CONFIG_DIR, delete that folder instead.

A hook that blocks everything?

If a broken setup stops every command, open your rc file in another editor or a new terminal and delete the shellfirm line (it follows the # Added by shellfirm init comment). See Common issues.