LibraLibra
LibraLibra
DocsBlogLibra
Getting Started
Architecture
Design
Commands
libra addlibra agentlibra alternateslibra applylibra archivelibra authlibra automationlibra bisectlibra blamelibra branchlibra bundlelibra cachelibra cat-filelibra check-attrlibra check-ignorelibra check-mailmaplibra checkoutlibra cherry-picklibra cleanlibra clonelibra cloudlibra code-controllibra codelibra commit-treelibra commitlibra completionslibra configlibra credentiallibra depslibra describelibra diff-fileslibra diff-indexlibra diff-treelibra difflibra dirtylibra fast-exportlibra fast-importlibra fetchlibra filelibra for-each-reflibra format-patchlibra fscklibra gclibra graphlibra greplibra hash-objectlibra hookslibra hydratelibra index-packlibra initlibra investigatelibra layerlibra lfslibra loglibra logfilelibra loginlibra logoutlibra ls-fileslibra ls-remotelibra ls-treelibra maintenancelibra medialibra merge-baselibra merge-filelibra mergelibra metadatalibra mvlibra noteslibra oplibra openlibra pack-objectslibra packagelibra prunelibra publishlibra pulllibra pushlibra read-treelibra rebaselibra refloglibra remotelibra repacklibra replacelibra rererelibra resetlibra restorelibra rev-listlibra rev-parselibra revertlibra reviewlibra revisionlibra rmlibra sandboxlibra servicelibra shortloglibra show-reflibra showlibra sparse-viewlibra stashlibra statslibra statuslibra switchlibra symbolic-reflibra taglibra update-indexlibra update-reflibra usagelibra verify-packlibra whoamilibra worktreelibra write-tree
API Reference
Policy
Commands

libra maintenance

Command reference for `libra maintenance`

Run tasks to optimize Git repository data.

Synopsis

libra maintenance <subcommand> [options]

Description

The maintenance command runs a set of scheduled maintenance tasks that help keep a Libra repository efficient and healthy. It is modelled after Git's git maintenance command (introduced in Git 2.29).

Tasks can be run individually or all at once. A --dry-run mode is available to preview what would be changed without performing any writes.

Subcommands

run

Run one or more maintenance tasks.

libra maintenance run [--task <task>] [--dry-run] [--quiet]

Options

  • --task <task> — Task to run (may be given multiple times). Defaults to all tasks.
  • --dry-run — Report what would be done without making any changes.
  • --quiet, -q — Suppress progress output.

Supported tasks

TaskDescription
gcRemove unreachable loose objects
loose-objectsPack old loose objects into a new pack file
pack-refsCollapse individual ref files into packed-refs
incremental-repackRepack existing pack files
commit-graphWrite a Git-compatible v1 commit-graph file (incl. octopus merges via the EDGE chunk, and SHA-256 repositories with 32-byte OIDs + a SHA-256 trailer)
prefetchPrefetch remote refs (requires remote config; skipped)

register

Register the current repository for periodic maintenance.

libra maintenance register [--schedule <schedule>]
  • --schedule <schedule> — Cron-like schedule expression (default: hourly).

unregister

Unregister the current repository from periodic maintenance.

libra maintenance unregister

status

Show whether this repository is registered for maintenance.

libra maintenance status

Examples

Run all maintenance tasks:

libra maintenance run

Run only garbage collection:

libra maintenance run --task gc

Preview what would be done:

libra maintenance run --dry-run

Register the repository with a daily schedule:

libra maintenance register --schedule=daily

Show registration status as JSON:

libra --json maintenance status

See Also

  • libra gc (not yet implemented)
  • libra fsck

libra ls-tree

Command reference for `libra ls-tree`

libra media

Command reference for `libra media`

On this page

SynopsisDescriptionSubcommandsrunregisterunregisterstatusExamplesSee Also