Delete an artifact

Learn how to delete artifacts.

There is currently no way to delete an artifact directly, because it may lead to a broken state of the ZenML database (dangling references to pipeline runs that produce artifacts).

However, it is possible to delete artifacts that are no longer referenced by any pipeline runs:

zenml artifact prune

By default, this method deletes artifacts physically from the underlying artifact store AND also the entry in the database. You can control this behavior by using the --only-artifact and --only-metadata flags.

You might find that some artifacts throw errors when you try to prune them, likely because they were stored locally and no longer exist. If you wish to continue pruning and to ignore these errors, please add the --ignore-errors flag. Warning messages will still be output to the terminal during this process.

Last updated