Skip to main content
Uninstalling Opsh removes the binary and cleans the shell integration out of your rc files. Your configuration is preserved by default so you can reinstall without reconfiguring. Choose the method that suits you best.

Two ways to uninstall

From inside the Opsh REPL, type:
!uninstall
Opsh runs the uninstall script and then hands control back to your shell. From your terminal directly, run the uninstall script:
curl -fsSL https://opsh.dxu.one/uninstall.sh | bash
Both methods perform the same steps.

What gets removed

  • ~/.opsh/bin/ — the directory containing the opsh binary
  • ~/.opsh/install.sh and ~/.opsh/uninstall.sh — the installer scripts cached in the Opsh directory
  • The # >>> opsh initialize >>> block from your shell rc files — Opsh removes its managed startup block from ~/.zshrc, ~/.bashrc, ~/.bash_profile, and ~/.profile if they exist

What is kept

  • ~/.opsh/config.json — your configuration file (provider, API key, model, and all settings) is preserved so you can reinstall without setting up from scratch
  • The ~/.opsh/ directory — if config.json or any other files remain, the directory itself is not deleted
If you want to delete your configuration as well and remove the ~/.opsh/ directory entirely, run:
rm -rf ~/.opsh
After uninstalling, open a new terminal session for the PATH change to take effect. The opsh command will no longer be available in terminals opened after that point.