Skip to content

Uninstall

Removing Worthless is the exact reverse of installing it: every key you locked is written back to your .env before anything is deleted. You are never left holding a half-key.

Terminal window
worthless uninstall

That single command:

  1. Restores every locked .env to its real key, undoing the lock (the proxy BASE_URL line Worthless added is removed too).
  2. Reverts your OpenClaw config — provider entries are restored to point back at the real provider with the real key.
  3. Stops the running proxy daemon (default port 8787) if one is up.
  4. Deletes ~/.worthless/ (the local database and encryption key) and the encryption key held in your OS keychain.

The order matters: Worthless restores everything first, verifies it succeeded, then wipes. If any recoverable key cannot be put back, it stops before deleting anything — so an uninstall can never strand a key it was able to recover.

Flag What it does
--yes Skip the confirmation prompt. Use this in scripts, CI, and agents. In a non-interactive shell, uninstall refuses without --yes rather than guess.
--force Proceed even when the install is broken or a key can’t be restored. This widens what gets wiped — it never skips restoring a key on a healthy install.

If ~/.worthless/ is damaged — the encryption key is gone, or the database is corrupted — the locked keys can no longer be reconstructed. Uninstall refuses and tells you so, instead of crashing:

Terminal window
$ worthless uninstall
Can't read this Worthless install (the encryption key or database is missing/unreadable).
Re-run with --force to wipe the remains.
Terminal window
$ worthless uninstall --force
Worthless removed. The locked keys were unrecoverable — rotate them at your provider.

--force on a broken install does not recover your keys. It cleans the machine; the keys themselves are lost and must be rotated at the provider.

If you deleted a project whose .env was locked, that file is simply skipped with a warning — a missing file is never treated as a failed restore, and it never blocks the uninstall:

Terminal window
$ worthless uninstall
Skipping a project whose file is gone (its key was already lost with the file)... done.
Worthless removed.

Not sure what state you’re in? worthless doctor tells you, and points at the fix:

Terminal window
worthless doctor # human-readable
worthless doctor --json # machine-readable, for agents

On a broken install, both report the problem and recommend worthless uninstall --force — neither crashes.

For scripts and agents:

Code Meaning
0 Uninstall completed.
1 Refused — confirmation declined, a non-interactive shell without --yes, or a broken install without --force.
73 Uninstall completed, but reverting the OpenClaw config partially failed — check openclaw.json.

If you added the Worthless MCP server to your editor, that’s a worthless entry you hand-added to its MCP config. Uninstall auto-detects and names your Claude Code (.mcp.json or ~/.claude.json) or Cursor (~/.cursor/mcp.json) config when it holds one, and by default never edits it — that file holds your other MCP servers too.

To have uninstall clean it up for you, opt in:

Terminal window
worthless uninstall --remove-mcp

That deletes only the Worthless entry. Your other MCP servers and every other key keep their exact values, the original is saved next to it as <config>.worthless.bak, and the rewrite is atomic — a symlinked or unparsable config is refused untouched. Note the file is re-serialized when we edit it: your indent width is preserved, but compact nested objects get expanded onto separate lines. (Nothing is touched at all when there’s no Worthless entry to remove.) Without the flag, remove the worthless entry yourself. (Windsurf and other editors aren’t auto-scanned — remove the entry there by hand.) The uninstall contract has the full accounting.

  • Recovery — what to do if your .env was corrupted or deleted (Worthless does not back it up).
  • Uninstall contract — the line-by-line list of everything Worthless installs and exactly how uninstall removes or restores each item.