
PurgeFiles
Purge namespace files for one or multiple namespaces.
Purge namespace files for one or multiple namespaces.
Purge namespace files for one or multiple namespaces.
This task purges namespace files (and their versions) stored in Kestra. You can restrict the purge to specific namespaces (or a namespace glob pattern), optionally include child namespaces, and filter files by a glob pattern. The purge strategy is controlled via behavior (e.g. keep the last N versions and/or delete versions older than a given date).
type: "io.kestra.plugin.core.namespace.PurgeFiles"Examples
Purge old versions of namespace files for a namespace tree.
id: purge_namespace_files
namespace: system
tasks:
- id: purge_files
type: io.kestra.plugin.core.namespace.PurgeFiles
namespaces:
- company
includeChildNamespaces: true
filePattern: "**/*.sql"
behavior:
type: version
before: "2025-01-01T00:00:00Z"
Properties
behaviorstring
{"type":"version","keepAmount":1}Purge behavior
Defines how files are purged.
io.kestra.plugin.core.namespace.FilesPurgeBehavior
filePatternstring
File pattern, e.g. 'AI_*'
Delete only files whose path is matching the glob pattern.
includeChildNamespacesbooleanstring
trueDelete files from child namespaces
Defaults to true. This means that if you set namespaces to company, it will also delete files from company.team, company.data, etc.
namespacePatternstring
Glob pattern for the namespaces to delete files from
If not set (e.g., AI_*), all namespaces will be considered. Can't be used with namespaces - use one or the other.
namespacesarray
List of namespaces to delete files from
If not set, all namespaces will be considered. Can't be used with namespacePattern - use one or the other.
Outputs
sizeinteger
The number of purged namespace file versions