ccdeck

Remove ccdeck from a machine

No ccdeck hook left in Claude Code, nothing starting ccdeck at login, its private key deleted, and its command, app and folders gone.

Claude Code and Codex Checked against ccdeck 3.31.0 on

Before you start

Steps

  1. Stop every deck

    Each time a deck starts, it writes its hook entries into Claude Code’s settings again: at login, when the desktop app opens, and when a deck restarts after a crash or an update. So stop them all before you take the entries out.

    If you have the desktop app, click the ccdeck icon in the menu bar, or right-click it in the tray on Windows and Linux. Click Start at login so that it is not ticked, then click Quit ccdeck. Quit stops only the deck the app started itself. Then, in a terminal:

    npx ccdeck --stop

    It stops every deck on the machine and prints stopped with each one’s pid, port and how long it was up, or no deck is running. A deck stopped this way does not restart itself.

  2. Remove the hooks, the login item and the private key

    npx ccdeck --uninstall --purge

    It starts no deck. It does these in order, and prints the paths in full:

    • It takes every entry ccdeck added out of ~/.claude/settings.json ($CLAUDE_CONFIG_DIR/settings.json when that is set): those marked "__agent-dag": true, and older ones that run its hook.js. Every other setting and hook in the file stays; when it removes something, it writes the file back as JSON indented by two spaces. It prints ccdeck: hooks removed from ~/.claude/settings.json, or ccdeck: no Claude hooks to remove.
    • If ccdeck gave this machine a login item, it removes it and prints ccdeck: no longer starts at login. It finds the item through a record in ccdeck’s data folder, which is why that folder is deleted last.
    • Where an older ccdeck added a finish-sound hook, it removes that too (ccdeck: sound hook removed), and puts back sound hooks of yours that it had set aside.
    • If ~/.codex/ exists, it takes out the forwarders an older ccdeck put in ~/.codex/hooks.json. Current versions add none, so this usually prints ccdeck: no Codex hooks to remove.
    • It deletes prefs.json from the data folder and from ~/.claude/agent-dag/, and prints ccdeck: removed and the path for each. With neither there, it prints ccdeck: no ccdeck state to purge.

    prefs.json holds this deck’s Local network private key, the key every deck you paired with has pinned. Local network is on unless you switch it off, and it makes the key the first time it runs. On a machine that ran an older ccdeck, the file was copied to the data folder and the old copy left in ~/.claude/agent-dag/, so there are two; --purge deletes both. Your pairings, aliases and the choice of which accounts this deck offers are in the same file, and go with it. The key is never printed.

    Without --purge, the command deletes no prefs.json. It lists each one that still holds a key, under ccdeck: this deck's LAN private key is still on this machine:.

    The command exits with 1 if any part of it was refused, and says which. If something goes wrong has each refusal.

    On each deck you paired with, this machine stays in its list until you unpair it there. Press A to open the Claude accounts panel, click Local network at its foot, click unpair on this machine’s row, then click confirm within four seconds. Unpairing stops future exchanges; a login already copied stays where it went.

  3. Remove the ccdeck command

    Only if you installed it with npm i -g ccdeck or npx ccdeck --install, which runs that same install:

    npm rm -g ccdeck

    An install under ccdeck’s earlier names comes out with npm rm -g agents-deck agent-dag. A deck you only ever ran with npx ccdeck needs nothing here: npx ran it from npm’s cache, which npm clears by itself, and it never had a login item.

  4. Remove the desktop app

    Only if you have it, and after step 2: removing the app leaves its hook entries in Claude Code’s settings. The app has no uninstall of its own.

    • On macOS, move ccdeck.app from Applications to the Bin. The terminal installer on this site puts it in ~/Applications when /Applications is not writable.
    • On Windows, the app was installed for your user only. Remove ccdeck in Windows Settings, from the list of installed apps.
    • On Linux, delete the AppImage file. If you installed the .deb, remove its package with your package manager; dpkg -l | grep -i ccdeck shows its name.

    The app also keeps its window and notification settings and its own logs where Electron keeps an app’s files. This guide does not list those places.

  5. Remove claude-swap, if ccdeck installed it Claude Code only

    ccdeck installs claude-swap for its Claude accounts panel when it is not on the machine. Remove it only if it was not there before ccdeck and you do not use cswap yourself. It is installed as a tool of your user, not inside ccdeck’s folders, so remove it with the installer that put it there. ccdeck tries uv first, then pipx:

    uv tool uninstall claude-swap

    or pipx uninstall claude-swap. With neither on your PATH, ccdeck used pipx through Python (python3 -m pipx uninstall claude-swap, or py -m pipx uninstall claude-swap on Windows), or a uv it downloaded into ~/.agents-deck. Step 6 deletes that uv, so run it first: ~/.agents-deck/tools/uv/uv tool uninstall claude-swap, or %USERPROFILE%\.agents-deck\tools\uv\uv.exe tool uninstall claude-swap on Windows.

    claude-swap’s store of saved Claude logins, ~/.claude-swap-backup on macOS and Windows and ~/.local/share/claude-swap on Linux, is claude-swap’s own. Once, when ccdeck found it empty, it added the account you were signed in with. No ccdeck command touches it; delete it only if you mean to lose those logins.

  6. Delete ccdeck’s folders

    Do this last. ccdeck keeps its own files in four folders:

    • ~/.claude/agent-dag/: the hook script Claude Code ran, hook.js; the records running decks leave for each other; Browser Watch’s findings, browser-watch/state.json and watch.log; the desktop app’s hook launcher; and, on a machine that ran an older ccdeck, its old event log. Delete this folder, not ~/.claude.
    • The data folder: ~/Library/Application Support/ccdeck on macOS, %LOCALAPPDATA%\ccdeck\Data on Windows, ~/.local/share/ccdeck on Linux ($XDG_DATA_HOME/ccdeck when that is set). It holds the login-item record, and any copy of prefs.json the deck set aside because it could not read it, named prefs.json.corrupt-… or prefs.json.foreign-…. --purge leaves those copies, and they can hold the key.
    • The log folder: ~/Library/Logs/ccdeck on macOS, %LOCALAPPDATA%\ccdeck\Log on Windows, ~/.local/state/ccdeck on Linux ($XDG_STATE_HOME/ccdeck when that is set). It holds the event log, events.jsonl, and deck.log.
    • ~/.agents-deck/: the copies of ccusage, uv and macmon that ccdeck fetched for itself, and its account state: the auto-switch setting, a tally per account, and a log of which Claude account was active when, with each account’s e-mail address. A ccusage you installed yourself is not in it.

    On macOS:

    rm -rf ~/.claude/agent-dag ~/Library/Application\ Support/ccdeck ~/Library/Logs/ccdeck ~/.agents-deck

    On Linux:

    rm -rf ~/.claude/agent-dag ~/.local/share/ccdeck ~/.local/state/ccdeck ~/.agents-deck

    On Windows, in PowerShell. %LOCALAPPDATA%\ccdeck holds both Data and Log:

    Remove-Item -Recurse -Force "$env:USERPROFILE\.claude\agent-dag", "$env:LOCALAPPDATA\ccdeck", "$env:USERPROFILE\.agents-deck"

    With CLAUDE_CONFIG_DIR set, the first folder is $CLAUDE_CONFIG_DIR/agent-dag, and it holds the data and the log as well. With CCDECK_HOME set, the data and the log are both in that folder instead. An event log you moved with --history is where you put it.

    None of the steps touches Claude Code’s or Codex’s own files, hooks of your own, or claude-swap’s store.

If something goes wrong

ccdeck: Claude hooks NOT removed — … could not be read as JSON (…)

The file was left exactly as it was, and the command exited with 1. If the words in brackets are another writer changed settings.json while the uninstall was running, a deck was starting at that moment: do step 1 again, then step 2. Otherwise the file is not valid JSON. Repair it, or move it aside, and run step 2 again. By hand, the entries to delete are the objects marked "__agent-dag": true in the lists under "hooks". The same line for Codex names ~/.codex/hooks.json.

The hook entries are back in settings.json

A deck started again and wrote them back. Do step 1 again, with the desktop app’s Start at login not ticked, then step 2.

ccdeck still starts when you log in

Step 2 removes the login item only when it finds ccdeck’s record of it in the data folder. It does not when that folder was deleted first, or when CLAUDE_CONFIG_DIR or CCDECK_HOME differ from when the item was made. Run npx ccdeck --uninstall-service, which looks at the machine instead of the record. It prints no longer starts at login, or it was not starting at login. It writes a small record into ccdeck’s data folder again; delete that folder afterwards, as in step 6.

The item is ~/Library/LaunchAgents/ccdeck.plist on macOS, ~/.config/systemd/user/ccdeck.service on Linux, and the Task Scheduler task ccdeck on Windows. The desktop app’s Start at login is a separate item that no ccdeck command removes: untick it before you remove the app.

ccdeck: could NOT remove the login item — …

launchd, systemd or Task Scheduler refused, or the file could not be deleted. The reason is on the line, and the item is named in brackets at its end. Remove the item yourself, then run step 2 again.

ccdeck: could NOT remove … — …, then ccdeck: this deck's LAN private key is still in that file.

Your user could not delete that prefs.json; the reason is at the end of the first line. Delete the file yourself, then run step 2 again until it prints ccdeck: no ccdeck state to purge.

ccdeck: no Claude hooks to remove, but Claude Code still runs ccdeck’s hook

The deck ran with a different CLAUDE_CONFIG_DIR, and step 2 reads only the settings.json it points at now. Run step 2 again with CLAUDE_CONFIG_DIR set as the deck had it, once for each profile.

ccdeck: your own sound hooks were NOT restored — …

Sound hooks of yours that an older ccdeck set aside are still in ~/.agents-deck/parked-sound-hooks.json, which could not be read. Keep ~/.agents-deck until you have them back: repair that file, then run step 2 again.

This machine has no Node.js

Install Node.js 18 or newer for step 2, or do its work by hand. In ~/.claude/settings.json, delete every object marked "__agent-dag": true from the lists under "hooks". Then do steps 4 to 6: step 6 deletes both copies of prefs.json with the folders they are in.

macOS: ccdeck opened again after Quit ccdeck

An update had finished downloading, and quitting installed it and opened the new version. Click Quit ccdeck again.

Next