gc

Garbage-collect unreachable CAS objects and maintain cache databases.

Back to CLI Commands

gc is the maintenance command for cleaning up Rinne data under .rinne. It can delete unreachable CAS objects and maintain cache databases used by the workspace.

Use --dry-run first when you want to inspect what would be removed without changing any data under .rinne.

In a format v2 repository, gc also maintains pack files: packs with no live chunks are removed, and packs whose live share drops below half are rewritten so the space can be reclaimed.

Usage
rinne gc [--dry-run] [--vacuum] [--parallel <N>] [--no-cas] [--no-db] [--no-tmp] [--repack-loose]
Options
--dry-run
Report what would be removed without deleting anything.
--vacuum
Run VACUUM for the cache database. This can be heavy.
--parallel <N>
Override parallelism for CAS deletion.
--no-cas
Skip CAS cleanup.
--no-db
Skip cache database maintenance.
--no-tmp
Keep .rinne/tmp instead of cleaning it, for example to keep a restore-stash left by a failed restore. New in v0.9.8.
--repack-loose
Move loose CAS objects (individual chunk files, such as those kept from before upgrade) into pack files. Format v2 only. New in v0.9.8.
Examples
Preview cleanup only
rinne gc --dry-run
Run normal cleanup
rinne gc
Clean CAS only with custom parallelism
rinne gc --no-db --parallel 8
Maintain databases only and vacuum
rinne gc --no-cas --vacuum
Pack loose chunks left from format v1 after upgrade
rinne gc --repack-loose
Notes
  • Use gc after delete when you want unreachable chunks and staged trash data to be cleaned up.
  • --vacuum is intentionally optional because it can be expensive.
  • --repack-loose is never run implicitly. Without it, gc behaves the same as in v0.9.7 (loose chunks stay as individual files).