﻿# ZenML artifact pruning: deleting metadata and deleting stored files are different outcomes

Interpret ZenML artifact pruning options through the distinction between physical artifact files, database entries and pipeline lineage references.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-zenml-artifact-pruning-metadata-versus-files/
Language: en

## An entry survives while loading stops working

A team cleans experiment storage and later sees an artifact record that can no longer load its underlying files. Another cleanup leaves files in storage after their database entries disappear. These outcomes reflect different cleanup scopes, not necessarily a contradictory user interface.

Before evaluating storage housekeeping, state what should survive: physical data, searchable records, producer lineage or all of them. A successful deletion operation is meaningful only in relation to that intended outcome and the artifacts other runs still require.

## Pruning operates on unused artifacts

The [artifact guide](https://docs.zenml.io/concepts/artifacts) explains artifact relationships and pruning of artifacts no longer referenced by pipeline runs. The reference condition matters. Removing a run and removing the artifacts that were associated with it are related but different management operations.

Inspect the actual candidate set rather than assuming every old artifact is unused. A model comparison may intentionally retain a historical input or checkpoint after newer runs appear. Age alone does not establish whether losing an object changes a promised reproducibility capability.

## Physical files and records can be treated separately

The [cleanup guide](https://docs.zenml.io/user-guides/best-practices/keep-your-dashboard-server-clean) documents options that distinguish physical artifact deletion from metadata deletion. Understand those scopes before interpreting a remaining record or a remaining storage object as evidence that cleanup failed.

For a noncritical example, inspect the record and attempt a real load after applying the intended scope. A listed URI only identifies a location. It does not establish that all required files at that location remain readable or semantically complete.

## Materializers determine the stored representation

The [artifact-store guide](https://docs.zenml.io/stacks/stack-components/artifact-stores) explains how materializers govern serialization and storage. A custom artifact can depend on more than a single obvious file, and some representations can refer to another storage system.

Use an [artifact manifest](/journal/tokenizer-artifact-release-manifest/) when a model requires several coordinated files. Preserving one weight file does not preserve the tokenizer and configuration needed to interpret it. Cleanup scope should reflect the actual representation rather than a display name.

## Explain intentional absence in historical evidence

A useful cleanup review records which retained capabilities were checked, such as loading a model, inspecting a report or reconstructing a comparison table. Validate those operations directly on an expendable test case before drawing conclusions from counts alone.

[Dataset removal lineage](/journal/data-guide-dataset-removal-lineage-tombstone/) provides a related documentation pattern. When data intentionally disappears, the remaining history should explain that absence instead of implying that every past experiment can still be reproduced from its database entry.
