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"
yaml
id: fs_local_delete
namespace: company.team

tasks:
  - id: delete
    type: io.kestra.plugin.fs.local.Delete
    from: /data/uploads/file.txt
Properties

The local file path to delete

Default false

Raise an error if the file is not found

Default true

Whether to include subdirectories

If true, the task will recursively delete files in all subdirectories.

Default false

Whether the file was deleted