.. rubric:: ``mirror snapshot list``

Snapshot listing.

``mirrors`` : ``array of object``
  Per-mirror snapshot listings, sorted by mirror id.

.. rubric:: ``mirror snapshot list``: entries of ``mirrors``

Snapshots of one mirror.

``id`` : ``string``
  Mirror name.
``latest-symlink`` : ``object``, optional
  The latest-snapshot symlink, if the mirror maintains one that points at a snapshot.
``names`` : ``array of object``
  Assigned names, sorted by name.
``snapshots`` : ``array of string``
  Snapshots, oldest first.

.. rubric:: ``mirror snapshot list``: entries of ``names``

A name pinned to a snapshot.

``name`` : ``string``
  Snapshot name.
``snapshot`` : ``string``
  Mirror snapshot timestamp in UTC, like 2025-03-05T14:30:45Z.

.. rubric:: ``mirror snapshot list``: ``latest-symlink``

The latest-snapshot symlink, if the mirror maintains one that points at a snapshot.

``name`` : ``string``
  Name of the latest-snapshot symlink.
``snapshot`` : ``string``
  Mirror snapshot timestamp in UTC, like 2025-03-05T14:30:45Z.

.. rubric:: ``mirror snapshot remove``

Summary of a snapshot removal.

``cleanup-errors`` : ``array of string``, optional
  Cleanup errors for a removed snapshot, such as failures to update the latest symlink or delete remaining files. Omitted if cleanup succeeded.
``latest-symlink`` : ``string``, optional
  New target of the latest symlink, if the removal moved it.
``latest-symlink-removed`` : ``boolean``, optional
  Whether the latest symlink was removed because no older snapshot remains.
``removed-names`` : ``array of string``
  Snapshot names (pinned symlinks) removed together with their target snapshot.
``snapshot`` : ``string``
  Mirror snapshot timestamp in UTC, like 2025-03-05T14:30:45Z.

.. rubric:: ``mirror snapshot prune`` and ``prune-all``

Prune summary. When garbage collection is requested, ``gc`` reports its outcome, including
failures. Dry runs omit ``gc``.

``dry-run`` : ``boolean``
  Whether this was a dry run, in which case nothing was removed.
``errors`` : ``integer``
  Number of failed snapshot removals and failed cleanup steps, plus one for every mirror
  that could not be pruned at all. Garbage collection failures are counted in ``gc.errors``.
``gc`` : ``object``, optional
  Garbage collection summary.
``kept`` : ``integer``
  Total number of snapshots selected for retention.
``mirrors`` : ``array of object``
  Per-mirror prune summaries, sorted by mirror id.
``removed`` : ``integer``
  Total number of removed snapshots, or snapshots a dry run would remove.

.. rubric:: ``mirror snapshot prune``: entries of ``mirrors``

Prune summary of one mirror.

``id`` : ``string``
  Mirror name.
``kept`` : ``integer``
  Number of snapshots selected for retention.
``removed`` : ``integer``
  Number of removed snapshots, or snapshots a dry run would remove. Removals with cleanup
  errors still count toward this total; see ``cleanup-errors``.
``snapshots`` : ``array of object``
  Per-snapshot prune decisions, newest first.

.. rubric:: ``mirror snapshot prune``: entries of ``snapshots``

What pruning decided for a single snapshot.

``cleanup-errors`` : ``array of string``, optional
  Cleanup errors for a removed snapshot, such as failures to update the latest symlink or delete remaining files. Omitted if cleanup succeeded.
``error`` : ``string``, optional
  Why a snapshot selected for removal could not be removed.
``keep`` : ``boolean``
  Whether the snapshot was selected for retention rather than removal.
``names`` : ``array of string``
  Names pinned to the snapshot, sorted.
``reason`` : ``string``, optional
  Reason for retaining the snapshot: named, latest-symlink, keep-last, keep-hourly,
  keep-daily, keep-weekly, keep-monthly, or keep-yearly. Omitted if the snapshot was selected
  for removal.
``snapshot`` : ``string``
  Mirror snapshot timestamp in UTC, like 2025-03-05T14:30:45Z.

.. rubric:: ``mirror gc``

Garbage collection summary.

``errors`` : ``integer``
  Number of pools whose garbage collection failed.
``mirrors`` : ``array of object``
  Per-mirror summaries; a pool shared by multiple mirrors is collected and listed once.
``removed-bytes`` : ``integer``
  Total size of the removed pool files in bytes.
``removed-files`` : ``integer``
  Total number of removed pool files.

.. rubric:: ``mirror gc``: entries of ``mirrors``

Garbage collection summary of one mirror's pool.

``id`` : ``string``
  Mirror name.
``removed-bytes`` : ``integer``
  Total size of the removed pool files in bytes.
``removed-files`` : ``integer``
  Number of removed pool files.

.. rubric:: ``mirror verify``

Pool verification summary.

``bytes`` : ``integer``
  Total size of the checked pool files in bytes.
``errors`` : ``integer``
  Number of pools that could not be verified.
``failed`` : ``integer``
  Total number of pool files that failed verification.
``pools`` : ``array of object``
  Per-pool summaries; a pool shared by multiple mirrors is verified and listed once.
``verified`` : ``integer``
  Total number of pool files that passed verification.

.. rubric:: ``mirror verify``: entries of ``pools``

Verification summary of one mirror's pool.

``base-dir`` : ``string``
  Base directory of the verified pool.
``bytes`` : ``integer``
  Total size of the checked pool files in bytes.
``failed`` : ``integer``
  Number of pool files that failed verification.
``id`` : ``string``
  Mirror name.
``verified`` : ``integer``
  Number of pool files that passed verification.

.. rubric:: ``mirror snapshot diff``

File-level differences between two snapshots.

``added`` : ``array of object``
  Files only present in the newer snapshot, sorted by path.
``changed`` : ``array of object``
  Files in both snapshots whose content differs, sorted by path.
``removed`` : ``array of object``
  Files only present in the older snapshot, sorted by path.

.. rubric:: ``mirror snapshot diff``: entries of ``added`` and ``removed``

A stored file present in only one of two snapshots.

``path`` : ``string``
  Path relative to the snapshot directory.
``size`` : ``integer``
  File size in bytes.

.. rubric:: ``mirror snapshot diff``: entries of ``changed``

A stored file present in both snapshots, but with differing content.

Only the size difference is reported: the diff compares stored files by inode, so a changed
file of the same size, like a re-signed ``Release`` file, reports a difference of zero.

``path`` : ``string``
  Path relative to the snapshot directory.
``size-difference`` : ``integer``
  Absolute difference between the two file sizes, in bytes.

.. rubric:: ``mirror snapshot diff --packages``

Package-level differences between two snapshots, by package kind.

``binary`` : ``object``
  Package-level differences between two snapshots, each list sorted by name.
``source`` : ``object``
  Package-level differences between two snapshots, each list sorted by name.

.. rubric:: ``mirror snapshot diff --packages``: ``binary`` and ``source``

Package-level differences between two snapshots, each list sorted by name.

``added`` : ``array of object``
  Packages only present in the newer snapshot, sorted by name.
``changed`` : ``array of object``
  Packages present in both snapshots with different versions, sorted by name.
``removed`` : ``array of object``
  Packages only present in the older snapshot, sorted by name.

.. rubric:: ``mirror snapshot diff --packages``: package list entries

A single package (binary or source) that differs between two snapshots.

``name`` : ``string``
  Package identity: ``<name>:<arch>`` for binary packages, the plain name for source
  packages.
``new-versions`` : ``array of string``
  Versions in the newer snapshot. Empty if the package was removed.
``old-versions`` : ``array of string``
  Versions in the older snapshot. Empty if the package was added.


