ReferenceCLI commands
BetaYou are reading docs for the beta channel (
2.4.1-beta.1) — updated automatically on every beta release.Switch to stable →CLI commands
ak agents remove
Remove an installed agent
Delete a agent's installed files; if the asset has a runtime env and skill runtime is not opted out, the env is also cleaned up. Idempotent - removing an absent ref reports an info notice and exits 0.
Who it's for: Both: scripted CI cleanup (--json) and users undoing an install.
When to use it: To uninstall a previously installed agent.
What changes on disk: Removes files under ~/.claude/plugins/<kit>/agents/<name>/. Unless AGENTKIT_SKILL_RUNTIME=0, also removes ~/.agentkit/skills/<kit>/<name>/.
Usage
ak agents remove <kit>/<agent> [flags]Examples
ak agents remove engineer/agent-browser
ak agents remove engineer/agent-browser --jsonFlags
| Flag | Description |
|---|---|
-h, --help | help for remove |
--json | Emit machine-readable JSON (implies --no-interactive) |
--no-interactive | Disable interactive prompts (CI-safe) |
-q, --quiet | Suppress non-error output on stderr |
-V, --verbose | Extra diagnostic output on stderr (loses to --quiet) |
-y, --yes | Assume yes for all prompts |
Output modes
| Mode | Behavior |
|---|---|
pretty | default on TTY (colors, ASCII markers) |
plain | auto when stdout piped or --no-interactive |
json | --json (single-object envelope, NDJSON-safe) |
Exit codes
| Code | Meaning |
|---|---|
0 | success |
1 | runtime error |
2 | invalid flags |
3 | user-cancel (SIGINT, prompt-cancel) |
Related commands
ak agents— Per-agent management commands