Delete a file or directory from the local filesystem.
Local filesystem access is disabled by default.
You must configure the plugin default allowed-paths
in your Kestra configuration.
Example (Kestra config):
yaml
plugins:
configurations:
- type: io.kestra.plugin.fs.local.Delete
values:
allowed-paths:
- /data/files
yaml
type: "io.kestra.plugin.fs.local.Delete"
Examples
yaml
id: fs_local_delete
namespace: company.team
tasks:
- id: delete
type: io.kestra.plugin.fs.local.Delete
from: /data/uploads/file.txt
Properties
from *Requiredstring
The local file path to delete
errorOnMissing booleanstring
Default
false
Raise an error if the file is not found
recursive booleanstring
Default
true
Whether to include subdirectories
If true, the task will recursively delete files in all subdirectories.
Outputs
deleted boolean
Default
false
Whether the file was deleted