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 ~/.config/opencode and ~/.cache/opencode with the separately installed OpenCode CLI, so removing the desktop app should leave both alone. 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.

    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 (3.6 MB in this test) Safe to remove with the desktop app
    The updater's download cache (about 299 MB in this test) Downloaded update files Safe to remove
    ~/.config/opencode Configuration, including opencode.json (per OpenCode's config docs); 61 MB in this test Shared with the OpenCode CLI; keep it while you use the CLI
    ~/.cache/opencode Cached data; 8.4 MB in this 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 ~/.config/opencode or ~/.cache/opencode, so even brew uninstall --cask --zap opencode-desktop leaves the CLI's files. Without --zap, only the app goes:

    brew uninstall --cask opencode-desktop
    

    When Mole removes a Homebrew-installed OpenCode Desktop, every zap entry that exists matches a row Mole selects by default, so Mole runs --zap unless you untick one of those rows, in which case it leaves --zap out.

    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. 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.

    Check the result

    pgrep -il opencode
    ls -d "$HOME/Library/Application Support/ai.opencode.desktop"
    ls -d "$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.
    • ls -d on the Application Support path printing it means the desktop app's data survived; "No such file or directory" means it is gone.
    • ls -d on the config and cache paths printing them means the CLI's files are intact, which is expected after removing only the desktop app.
    • 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.
    • ~/.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. Sign-in, the CLI's own uninstaller, installing an update and the Homebrew cask were not tested.

    Mac running low on space or slowing down? Mole can clean out the junk, remove apps completely and keep macOS in shape.

    Try Mole

    Mole · 鼴

    Cleanup, software, and status for your Mac.

    v1.16.0 (296) · 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.