Check and compact the repository: fsck and gc
Everyday repository maintenance, and what each command will and will not touch.
Written By Dustin
Last updated About 3 hours ago
Two maintenance commands. Neither is something you run daily, but both are worth knowing before you need them.
Check integrity
tovio fsckRe-hashes every object, verifies references, and verifies the per-actor signed audit chain. It also scans for private-key material that should never be in the object store.
It exits 0 only when no structural problem is found. A failure is TVO-STORE-004 (exit 7) and lists every problem: corrupt or malformed objects, broken references such as dangling refs or truncated history, or a broken audit chain. Suspected key material is an advisory warning — reported, but still exit 0.
The --json report carries ok, strict, objects_checked, kinds_checked, refs_checked, audit_entries_verified, and three arrays: problems, warnings, and promised (objects a partial clone has not fetched — informational and re-fetchable, never a failure).
Where that report sits depends on the outcome, and it catches scripts out. A clean store prints it as the top-level result and exits 0. A failing store carries the same report as the error envelope's context and exits 7 — one JSON document either way, never both. So a CI check should read the exit status first, then .context.problems on failure rather than .problems.
Reclaim space
tovio gctovio gc --dry-runGarbage-collects unreferenced objects. It is deliberately conservative: an object is removed only when it is reachable from no ref, no tag, and no op-log entry. That last condition is what keeps tovio undo and tovio redo intact across a collection. Obliteration tombstones are never removed.
--repack, --explode, --aggressive and --auto are mutually exclusive. The --json report includes pruned, reclaimed_bytes, repacked, exploded and dry_run.
Which one to reach for
Both commands are Advanced-tier, so they are hidden from the default tovio help index. They still run — tovio help --all lists them.