Skip to main content
Mole
Features Tested apps Testimonials Pricing FAQ Blog
EnglishEN 简体中文中 繁體中文繁 日本語日 한국어한 FrançaisFR DeutschDE ItalianoIT EspañolES PortuguêsPT
Buy nowBuy Download

    Help, documentation, releases, and articles.

    Home/Apps tested with Mole

    How to uninstall OpenCode on Mac

    OpenCode Desktop shares its sessions, configuration and cache with the separately installed OpenCode CLI: in this test the desktop app's conversations went into the same session database in ~/.local/share/opencode as the CLI's, and both use ~/.config/opencode and ~/.cache/opencode. Removing the desktop app should leave those folders alone, so your conversations stay available in the CLI. This guide covers OpenCode Desktop downloaded from opencode.ai and the Homebrew cask opencode-desktop. Remove the CLI separately, with its own command, only if you want it gone too.

    Quit OpenCode Desktop

    Quit OpenCode Desktop from its application menu, then check Activity Monitor for a lingering OpenCode process before you move on. An opencode process running in a terminal is the CLI; leave it alone unless you are removing the CLI too.

    Move OpenCode to Trash

    Open the Applications folder in Finder and move OpenCode to Trash.

    Review app data

    Press Shift + Command + G in Finder and check the paths below. Skip any that are missing.

    Location What it holds What to do
    ~/Library/Application Support/ai.opencode.desktop Desktop app data: window and workspace state, input drafts and caches (3.6 to 4.3 MB in these tests) Safe to remove with the desktop app
    ~/Library/Caches/@opencode-aidesktop-updater The next version, downloaded by the updater within minutes of first launch (about 290 MB in these tests) Safe to remove
    ~/.local/share/opencode Sessions, sign-in data, logs and per-project snapshots (per OpenCode's troubleshooting page); the desktop app writes its sessions here too Shared with the OpenCode CLI; keep it while you use the CLI or want your history
    ~/.local/state/opencode Prompt history and the last model you picked (observed in this test) Shared with the CLI; keep it while you use the CLI
    ~/.config/opencode Configuration, including opencode.json (per OpenCode's config docs); 61 MB in this test Shared with the CLI; keep it while you use the CLI
    ~/.cache/opencode Cached data such as the model list; 8.4 MB in the first test Shared with the CLI; keep it while you use the CLI

    If you installed it with Homebrew

    The opencode-desktop cask's zap list only names paths inside ~/Library that carry the desktop app's id, ai.opencode.desktop: Application Support, Caches, HTTPStorages, Logs, Preferences, Saved Application State, WebKit and its recent-documents list. It does not name the folders under ~/.local, ~/.config or ~/.cache, so even brew uninstall --cask --zap opencode-desktop leaves the CLI's files and your sessions. A direct zap does not consult Mole’s checkboxes. Without --zap, only the app goes:

    brew uninstall --cask opencode-desktop
    

    When Mole removes a Homebrew-installed OpenCode Desktop, its desktop zap paths match rows Mole normally selects by default. Mole checks the full removal list and skips --zap if it reaches unchecked data, shared files or anything it cannot verify, while still cleaning the leftovers you selected. Homebrew OpenCode Desktop cask

    Handle the CLI separately

    OpenCode's CLI reference documents an opencode uninstall command that removes OpenCode and its related files, with --keep-config (-c) to keep configuration, --keep-data (-d) to keep session data and snapshots, --dry-run to show what would be deleted without deleting it, and --force (-f) to skip confirmation. Removing the desktop app does not run it. Because the desktop app's sessions sit in the same place, running it without --keep-data also removes the conversations you had in the desktop app. If you want the CLI gone too, preview first:

    opencode uninstall --dry-run
    

    The dry run lists what the CLI's uninstaller would remove and deletes nothing. "command not found" means the CLI is not installed or not in this shell's PATH. A CLI installed with npm, as in the second test, can also be removed with npm uninstall -g opencode-ai, which removes the command but not the folders above.

    Check the result

    pgrep -il opencode
    ls -d "$HOME/Library/Application Support/ai.opencode.desktop" "$HOME/Library/Caches/@opencode-aidesktop-updater"
    ls -d "$HOME/.local/share/opencode" "$HOME/.local/state/opencode" "$HOME/.config/opencode" "$HOME/.cache/opencode"
    command -v opencode
    
    • No output from pgrep means no OpenCode process is running. A listed process means the desktop app or the CLI is still active; quit it before deleting more.
    • The first ls -d printing a path means that part of the desktop app's data survived; "No such file or directory" means it is gone.
    • The second ls -d printing the four folders shows those shared directories are still present, as expected after removing only the desktop app; it does not verify the contents of your sessions.
    • command -v opencode printing a path means the CLI is still installed; no output means this shell cannot find it, not that every file is gone.

    What Mole lists

    For OpenCode Desktop installed from opencode.ai's own download:

    • ~/Library/Application Support/ai.opencode.desktop, the updater's download cache and the other rows named after ai.opencode.desktop are listed and selected by default, including its recent-documents list under ~/Library/Application Support/com.apple.sharedfilelist when that file exists at scan time.
    • ~/.local/share/opencode, ~/.local/state/opencode, ~/.config/opencode and ~/.cache/opencode are not listed, since the CLI uses them too.

    What this test covered

    OpenCode Desktop 1.18.31 was downloaded from opencode.ai, copied into Applications, and quit and removed on September 22, 2026 with a development build of Mole, in a run with nine other apps. The rows belonging to OpenCode were ticked, and the app (428.9 MB), an updater cache (299.3 MB) and its Application Support folder (3.6 MB) went to the Trash. ~/.config/opencode (61 MB) and ~/.cache/opencode (8.4 MB) were not listed and stayed. OpenCode's recent-documents list was still on disk afterward.

    On September 28, 2026, OpenCode Desktop 1.18.32 from opencode.ai was used for one question alongside the OpenCode CLI 1.18.33, installed with npm and used for another. Both conversations landed in the same database in ~/.local/share/opencode. Within minutes of first launch the desktop updater had downloaded the next version into ~/Library/Caches/@opencode-aidesktop-updater (288 MB). Mole's Status page showed OpenCode as one row, 12 processes using 864 MB. On September 29, 2026 the desktop app was quit and removed with a development build of Mole in a run with other AI apps, with every row ticked; the app, its Library rows and the updater cache went to the Trash. The four folders it shares with the CLI were not listed and stayed, as intended while the CLI was installed; the CLI was then removed separately with npm. Sign-in, the CLI's own opencode uninstall, installing an update and the Homebrew cask were not tested.

    If Mac apps leave files behind after uninstalling, try Mole. I've personally tested and inspected 799 Mac apps.

    Try Mole

    Mole · 鼴

    Cleanup, software, and status for your Mac.

    v1.16.0 (304) · Release notes

    Product

    Mac Cleaner App Uninstaller Mac Optimizer Disk Analyzer System Monitor

    Support

    Help Documentation Releases Blog

    Legal

    Terms of Service Privacy Policy Refund Policy

    Resources

    CLI Tool Affiliate Program

    Connect

    Twitter hi@mole.fit

    Mole’s only official website mole.fit · Avoid installers from unknown sources

    The CLI stays free for terminal workflows.