clean
Run capa clean when you want to strip capa-managed artifacts before a reinstall or when leaving a project.
Synopsis
Section titled “Synopsis”capa cleanThis command has no command-specific flags. Global flags still apply; see Global flags.
What it removes
Section titled “What it removes”- Skill directories capa installed for each provider
- capa-managed MCP client config entries
- capa-managed blocks in
AGENTS.md/CLAUDE.md(deletes the file if it becomes empty) - capa-installed rules and sub-agent files
- capa-installed hook entries (hand-authored hooks are preserved)
- Materialized hook scripts under
~/.capa/hooks/<projectId>/ capabilities.lock- Active wrap sessions and wrap workspaces for the project
It does not delete your capabilities.yaml / .json or user-authored provider files.
Safety
Section titled “Safety”- Symlinked provider directories are skipped. If a provider path such as
.cursor/skillsis a symlink (often to project source, e.g..cursor/skills → ../skills),capa cleanrefuses to delete through it and prints a warning instead. - Wrap-only projects leave the real tree alone. When capa’s managed files exist only in wrap workspaces,
capa cleandoesn’t sweep provider files in the real project. - Hook entries are matched reliably. When several capa hooks live in one provider config file, each is removed even if earlier removals shifted its position.
capa cleanrefuses to run inside a wrap workspace: run it from the real project path.
Examples
Section titled “Examples”capa cleancapa clean && capa install