# Maintenance

Reconcile the stores with vacuum.

```sh
bookmark-context vacuum
```

**Stop the daemon first** — two processes must not open the Chroma store at once.

`vacuum` removes data the SQLite and Chroma stores no longer agree on:

- rows orphaned while SQLite foreign keys were off,
- Chroma collections whose SQLite collection is gone,
- vectors no chunk row points at any more — the surplus a re-index leaves when a
  page yields fewer chunks than before.

It also resets bookmarks stuck in `indexing` by a daemon that stopped, so they
show as retryable errors instead of hanging in progress. It prints a count per
category.

Safe to run repeatedly; a second pass on clean data deletes nothing.
