
Core Plugins and tasks PurgeFlows
CertifiedPurge old flow revisions.
Core Plugins and tasks PurgeFlows
Purge old flow revisions.
Deletes old flow revisions using a purge behavior (default keeps 1 latest revision), with optional namespace prefix and flow ID filters.
The latest revision of each flow is always kept.
type: io.kestra.plugin.core.flow.PurgeFlowsExamples
Purge old flow revisions for a namespace tree.
id: purge_flow_revisions
namespace: system
tasks:
- id: purge_flows
type: io.kestra.plugin.core.flow.PurgeFlows
namespace: company
behavior:
keepAmount: 2
Properties
assets
Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset failure behavior
Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150behavior string
{"keepAmount":1}Purge behavior
Defines how old flow revisions are purged.
io.kestra.plugin.core.flow.Version
The date before which revisions should be purged.
Must be an ISO-8601 instant, for example 2026-01-01T00: 00: 00Z. Using this filter will never delete the latest revision or the latest non-draft revision of a flow to avoid accidental flow deletion.
>= 1How many revisions should be kept for each matching flow.
The latest revision and the latest non-draft revision are always kept.
flowId string
The flow ID whose old revisions should be purged
You need to provide the namespace property if you want to purge a flow.
namespace string
Namespace whose flows need to be purged, or namespace of the flow that needs to be purged
If flowId isn't provided, this is a namespace prefix, else the namespace of the flow.
Outputs
size integer
The number of purged flow revisions