[PR #5208] feat: add uninstall command #11290

Closed
opened 2026-02-16 18:16:06 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/5208

State: closed
Merged: Yes


Summary

Adds opencode uninstall command that cleanly removes all OpenCode-related files.

Closes #3900

Changes

  • New file: packages/opencode/src/cli/cmd/uninstall.ts
  • Modified: packages/opencode/src/index.ts (import + register command)

Features

  • Auto-detects installation method (curl, npm, pnpm, bun, yarn, brew)
  • Removes XDG directories: data, cache, config, state
  • Cleans shell PATH for curl installs (bash, zsh, fish)
  • Safety options:
    • --dry-run: Preview what would be removed
    • --keep-config: Preserve configuration files
    • --keep-data: Preserve session data and snapshots
    • --force: Skip confirmation prompt

Testing

bun dev uninstall --help
bun dev uninstall --dry-run
bun dev uninstall --dry-run --keep-config
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/5208 **State:** closed **Merged:** Yes --- ## Summary Adds `opencode uninstall` command that cleanly removes all OpenCode-related files. Closes #3900 ## Changes - New file: `packages/opencode/src/cli/cmd/uninstall.ts` - Modified: `packages/opencode/src/index.ts` (import + register command) ## Features - **Auto-detects installation method** (curl, npm, pnpm, bun, yarn, brew) - **Removes XDG directories**: data, cache, config, state - **Cleans shell PATH** for curl installs (bash, zsh, fish) - **Safety options**: - `--dry-run`: Preview what would be removed - `--keep-config`: Preserve configuration files - `--keep-data`: Preserve session data and snapshots - `--force`: Skip confirmation prompt ## Testing ```bash bun dev uninstall --help bun dev uninstall --dry-run bun dev uninstall --dry-run --keep-config ```
yindo added the pull-request label 2026-02-16 18:16:06 -05:00
yindo closed this issue 2026-02-16 18:16:06 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11290