.opencode/agents/. Supports single agents, categories, packs, and bulk removal.
Usage
Uninstall Modes
Single Agent
Remove a specific agent by name:- Delete
.opencode/agents/<category>/<name>.md(or root for primary agents) - Remove the lock file entry from
.manifest-lock.json - Clean up empty category directories
- Report “not installed” if the agent doesn’t exist on disk
Category Mode
Remove all agents from one or more categories:languages, ai, web, data-api, devops, devtools, security, mcp, business, docs
Pack Mode
Remove all agents from one or more packs:Uninstall All
Remove every agent in the registry:Flags
Preview what would be removed without deleting any files.
Mutual Exclusivity
These flags cannot be combined:--all+--pack--all+--category--pack+--category
Security
Symlink protection: The CLI refuses to delete symlinks. If an agent file is a symlink,
uninstall will fail with a security error to prevent directory traversal attacks.Examples
Uninstall a single agent
Uninstall a category
Uninstall a pack with dry-run
Uninstall all agents
Uninstall an agent that doesn’t exist
Output Summary
After batch uninstallation (category, pack, or all), the CLI prints:- removed — Agents successfully deleted from disk
- not found — Agents that were not installed
- failed — Agents that encountered an error during deletion (e.g., permission denied, symlink detected)
Exit Codes
| Code | Meaning |
|---|---|
0 | All agents removed successfully (or not found) |
1 | One or more agents failed to uninstall, or validation error |
What Gets Deleted
- Agent file —
.opencode/agents/<category>/<name>.md(or root for primary agents) - Lock entry — Corresponding entry in
.manifest-lock.json - Empty directories — Category folders are removed if empty after uninstall
The
.opencode/agents/ directory itself is not deleted, even if empty.