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 filesshellfirm — 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-sourcedshellfirm.ps1, or the hook pasted into$PROFILEwithout the# Added by shellfirm initmarkers) is neither removed nor reported, andshellfirm statusdoes not list it. Remove it by hand: delete thesource/ 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 --yeswrote (onlymin_severity: Medium) is removed with the last hook. Settings you chose in theinitquestions 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, zedOnly 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.jsonIf 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.tomlThe 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 statusShell 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.fishstatus 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 shellfirmDelete 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 # macOSOn 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.
Plugins and frameworks
Does shellfirm work with oh-my-zsh, powerlevel10k, starship, atuin, zsh-autosuggestions, zsh-syntax-highlighting, bash-preexec and fish plugins? Where to put the hook line, ble.sh, and the doctor plugin lines.
Upgrading from 0.3.10 to 0.4.0
The steps to take after upgrading, and what changed in shellfirm 0.4.0.