nexus-clean¶
Safely delete indexed data for a project.
Synopsis¶
Description¶
Remove all indexed chunks for a specific project from the knowledge base. Includes safety features like confirmation prompts and dry-run mode to prevent accidental data loss.
Data Deletion
This command permanently deletes indexed data. Use --dry-run first to preview what will be deleted.
Options¶
| Option | Type | Default | Description |
|---|---|---|---|
--project-id |
TEXT | current | Project ID to clean |
--all |
FLAG | false | Delete ALL projects (dangerous!) |
--dry-run |
FLAG | false | Show what would be deleted without deleting |
Examples¶
Preview deletion (dry-run)¶
Output:
Found 3 documents for project: verify_test
Document types:
- lesson: 3
[DRY RUN] Would delete 3 documents for project verify_test
Delete current project¶
Output:
Found 156 documents for project: my-project
Document types:
- code: 98
- documentation: 58
Delete 156 documents? [y/N]: y
✅ Deleted 156 documents for project my-project
Delete specific project¶
Delete all projects (dangerous)¶
Output:
⚠️ WARNING: This will delete ALL 10707 documents from the database!
Are you absolutely sure? [y/N]: y
✅ Deleted all 10707 documents
Use Cases¶
- Force re-indexing: Clean project before running
nexus-reindex - Remove old data: Delete data from projects you no longer work on
- Database cleanup: Free up disk space by removing unused projects
- Testing: Reset knowledge base during development
Safety Features¶
- Confirmation prompts: Always asks before deleting
- Dry-run mode: Preview deletions with
--dry-run - Detailed breakdown: Shows what will be deleted by document type
- Current project default: Requires explicit
--allflag for full deletion
See Also¶
- nexus-reindex - Re-index entire project
- nexus-inspect - View database contents
- nexus-status - Check project statistics