Skip to content

clean

Run capa clean when you want to strip capa-managed artifacts before a reinstall or when leaving a project.

Terminal window
capa clean

This command has no command-specific flags. Global flags still apply; see Global flags.

  • 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.

  • Symlinked provider directories are skipped. If a provider path such as .cursor/skills is a symlink (often to project source, e.g. .cursor/skills → ../skills), capa clean refuses 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 clean doesn’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 clean refuses to run inside a wrap workspace: run it from the real project path.
Terminal window
capa clean
capa clean && capa install