
Core Plugins and tasks PurgeFiles
CertifiedPurge Namespace files (and versions).
Core Plugins and tasks PurgeFiles
Purge Namespace files (and versions).
Deletes files from Namespace storage using a purge behavior (default keeps 1 latest version), optional file glob, and Namespace filters (namespaces list or namespacePattern). Child Namespaces are included by default.
Use to clean old asset versions at scale; behavior controls retention (keepAmount/before).
type: io.kestra.plugin.core.namespace.PurgeFilesExamples
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
behavior string
{"type":"version","keepAmount":1}Purge behavior
Defines how files are purged.
io.kestra.plugin.core.namespace.FilesPurgeBehavior
filePattern string
File pattern, e.g. 'AI_*'
Delete only files whose path is matching the glob pattern.
includeChildNamespaces booleanstring
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.
namespacePattern string
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.
namespaces array
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.
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
Outputs
size integer
The number of purged namespace file versions