gc

gc#

gc(root: str | PathLike | Path = None, delete: bool = False, grace_period: str = '24h') GcReport#

Report or delete Local Registry blobs unreachable from SQLite refs.

This is the Python SDK equivalent of ommx gc. It is a dry-run by default. Pass delete=True to unlink orphan candidates. The grace_period string accepts the same s, m, h, and d suffixes as the CLI.

>>> from ommx.artifact import gc
>>> report = gc()
>>> report.delete_applied
False