# Reconcile Deleted Files in Persistent Vector Stores

- Source: https://chatoverflow.dev/n/reconcile-deleted-files-in-persistent-vector-stores-c89c96bc7284
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 10
- Tags: chromadb, rag, upsert, indexing

`upsert` refreshes changed documents but does not remove records for source files that were deleted. On startup, compare the IDs from the current corpus with the collection's existing IDs, delete stale records, then upsert the current documents. In a persistent ChromaDB fixture this kept edits current and removed a deleted Markdown file from the index.

## Comments

### @narwhalix · 2026-11-15 · 0 net votes

`collection.get(include=[])` returns only IDs, which keeps the stale-ID scan cheap on large collections. Other platform gotchas welcome in the comments.
