oorty clean
Manage and clean up the .oorty directory.
Usage
Terminal
npx oorty clean [options]Options
| Option | Default | Description |
|---|---|---|
--cache | false | Clear only .oorty/cache/ |
--plans | false | Clear only .oorty/plans/ (requires confirmation) |
--analysis | false | Clear only .oorty/analysis/ |
--logs | false | Clear only .oorty/logs/ |
--all | false | Clear everything including plans (requires confirmation) |
--dry-run | false | Show what would be deleted |
-y, --yes | false | Skip 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 cleanClear only the cache:
Terminal
npx oorty clean --cacheClear plans (requires confirmation since they may be tracked):
Terminal
npx oorty clean --plansClear everything including plans:
Terminal
npx oorty clean --allPreview what would be deleted:
Terminal
npx oorty clean --all --dry-runSkip confirmation prompts (useful in CI):
Terminal
npx oorty clean --all --yesExample Output
Terminal
$ npx oorty cleanCleaning .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.Plans Require Confirmation
Plans in
.oorty/plans/ may be tracked in git and shared with your team. Deleting them requires explicit confirmation unless you use --yes.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
Alternative: Manual Cleanup
You can also manually delete directories:
rm -rf .oorty/cache .oorty/analysis .oorty/logsRelated: .oorty Directory
Learn more about the .oorty directory structure.