
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
behavior 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