Command Palette

Search for a command to run...

oorty clean

Manage and clean up the .oorty directory.

Usage

Terminal
npx oorty clean [options]

Options

OptionDefaultDescription
--cachefalseClear only .oorty/cache/
--plansfalseClear only .oorty/plans/ (requires confirmation)
--analysisfalseClear only .oorty/analysis/
--logsfalseClear only .oorty/logs/
--allfalseClear everything including plans (requires confirmation)
--dry-runfalseShow what would be deleted
-y, --yesfalseSkip confirmation prompts
--cwd <path>.Set the working directory

What It Does

The clean command helps you manage the .oorty/ directory by removing ephemeral files:

  • Default behavior - Clears cache, analysis, and logs (ephemeral directories)
  • Preserves plans - By default, plans are not deleted since they may be tracked in git
  • Recreates structure - Empty directories are recreated after cleaning

Examples

Clear all ephemeral directories (cache, analysis, logs):

Terminal
npx oorty clean

Clear only the cache:

Terminal
npx oorty clean --cache

Clear plans (requires confirmation since they may be tracked):

Terminal
npx oorty clean --plans

Clear everything including plans:

Terminal
npx oorty clean --all

Preview what would be deleted:

Terminal
npx oorty clean --all --dry-run

Skip confirmation prompts (useful in CI):

Terminal
npx oorty clean --all --yes

Example Output

Terminal
$ npx oorty clean
Cleaning .oorty directory...
✓ Cleared .oorty/cache/ (2 files, 45 KB)
✓ Cleared .oorty/analysis/ (1 file, 12 KB)
✓ Cleared .oorty/logs/ (3 files, 8 KB)
○ Skipped .oorty/plans/ (use --plans or --all to include)
Cleanup complete! Freed 65 KB.

When to Clean

  • After major refactors - Clear cache to force fresh AI analysis
  • When debugging - Clear logs and regenerate to get fresh debug output
  • Before committing - Ensure only plans are tracked, not ephemeral data
  • CI pipelines - Start fresh on each run with oorty clean --yes

Related: .oorty Directory

Learn more about the .oorty directory structure.

.oorty Directory