Skip to main content

atomic compact

Reclaim unused space in the repository database. Introduced in Atomic 0.20.0.

Verified against CLI 0.20.0.

Synopsis​

atomic compact [--repository <REPOSITORY>] [--json]

Description​

Deleting views, unrecording changes, and pruning data can leave unused space in the repository database. atomic compact reclaims that space. It is safe to run at any time; it never removes reachable content.

Options​

OptionDescription
--repository <REPOSITORY>Path inside the repository or one of its sandboxes (default: .)
--jsonEmit the database path and before/after byte counts as JSON

Examples​

# Compact the current repository
atomic compact

# Compact from inside a sandbox, targeting the parent repository
atomic compact --repository ../..

# Machine-readable result
atomic compact --json

See Also​

  • doctor — Diagnose and repair repository indexes
  • view — Deleted views free VIEW_CHANGES entries that GC and compaction can then reclaim