prune_anonymous

prune_anonymous#

prune_anonymous(root: str | PathLike | Path = None, delete: bool = False, experiments: bool = False, older_than: Optional[str] = None) PruneAnonymousReport#

Report or delete anonymous Artifact and Experiment refs in the Local Registry.

This is the Python SDK equivalent of ommx prune-anonymous. It only removes SQLite refs when delete=True; manifest and payload blobs are left for gc() to reclaim if they become unreachable. Anonymous Experiment refs are included only when experiments=True. older_than accepts the same s, m, h, and d suffixes as the CLI.

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