Set recursive Explicitly on local.Delete
For the complete documentation index, see llms.txt. For a full content snapshot, see llms-full.txt. Append.mdto anykestra.io/docs/*URL for plain Markdown.
Available on:Open Source EditionEnterprise Edition
The recursive property of io.kestra.plugin.fs.local.Delete now defaults to false instead of true.
Flows that call io.kestra.plugin.fs.local.Delete on a directory without setting recursive explicitly will silently stop deleting subdirectory contents after upgrading to 2.0.0. No error is raised — the task will succeed but leave nested files in place.
Why the change
The previous default of true made directory deletions recursive without any explicit opt-in. A misconfigured from path could wipe an entire directory tree. The new default of false matches the behavior of every other Delete task in plugin-fs (SFTP, FTP, NFS, SMB) and requires an explicit opt-in for recursive deletion.
Migration steps
kestra-migrate adds recursive: true to every io.kestra.plugin.fs.local.Delete task that does not set recursive, which keeps the 1.3 behavior. To opt in to the safer default instead, remove the property from tasks that should not delete subdirectories.
To update flows by hand:
- Search all flows for tasks of type
io.kestra.plugin.fs.local.Delete. - For each task where
frompoints to a directory andrecursiveis not set, addrecursive: trueto preserve the previous behavior. - For tasks where
frompoints to a single file, no change is needed —recursivehas no effect on file targets.
Before (recursive deletion happened implicitly)
- id: cleanup type: io.kestra.plugin.fs.local.Delete from: /data/uploads/processed/After (opt in to keep the same behavior)
- id: cleanup type: io.kestra.plugin.fs.local.Delete from: /data/uploads/processed/ recursive: trueWas this page helpful?