vector-db-cleanup

Remove stale and orphaned chunks from the ChromaDB vector store.

5|3|Updated Feb 21, 2026
One-click install
npx skills add https://github.com/richfrem/agent-plugins-skills --skill vector-db-cleanup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vector-db-cleanup
Source: https://github.com/richfrem/agent-plugins-skills/tree/main/plugins/vector-db/skills/vector-db-cleanup
Command: npx skills add https://github.com/richfrem/agent-plugins-skills --skill vector-db-cleanup

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Removes stale and orphaned chunks from the ChromaDB vector store to keep the search index synchronized with the filesystem after deletes or renames.

Core Features & Use Cases

  • Keeps the vector index accurate by pruning chunks whose source files no longer exist.
  • Supports after file renames, major refactors, or periodic maintenance to prevent stale results.
  • Provides a safe execution path with an explicit profile param and consistency checks as optional validation.

Quick Start

Run the cleanup with the wiki profile to prune orphaned chunks from the vector store.

Frequently Asked Questions about vector-db-cleanup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I remove orphaned chunks from ChromaDB after deleting files?

To remove orphaned chunks from ChromaDB, run the provided Python cleanup scripts with a specific profile parameter like --profile wiki, which loads the correct vector space and prunes entries pointing to non-existent source files.

Why does my vector search return results for files that no longer exist?

Vector search returns stale results because the index retains orphaned chunks after file deletations or directory restructuring. Pruning the vector store removes these dangling entries and synchronizes the search index with the current filesystem.

What is the best way to clean up a vector store after a major code refactor?

The best way to clean up a vector store after a major refactor is to execute a pruning script that checks for source file existence and safely removes stale chunks, keeping the search index accurate.

How do I keep my vector search index synchronized with the filesystem?

You keep your vector search index synchronized with the filesystem by running periodic maintenance that prunes orphaned chunks, ensuring the vector store only contains entries for existing source files.

Do I need a specific profile to clean up the vector database?

Yes, you need to specify a profile parameter such as --profile wiki to load the correct vector space before the cleanup script can identify and remove the orphaned chunks safely.