Files

Delete File

Remove a file for good. There is no Trash and no undo — prefer Move to Trash unless you mean exactly this.

action.delete_file
FILEDelete File

At a glance

Does
Deletes one file outright
Emits
deletedPath, success
Works with
Any file outside the protected locations and ~/Documents

Set it up

Leave File Path blank and the node takes filePath off the incoming payload. Fill it in to template a path of your own.

The inspector for a Delete File node, with its destructive banner.
The inspector for a Delete File node, with its destructive banner.

Dry Run resolves the path, runs every safety check and returns the same payload without deleting anything. Wire the flow up with it on, watch what it resolves, then turn it off.

Beyond the paths every file node refuses, Delete File also refuses anything under ~/Documents. Permanent deletion there is too easy a mistake to leave open by default — use Move to Trash in that folder, or a Run Script step if you genuinely mean it.

Configure

FieldDefaultWhat it does
File Path—The file to delete. Blank falls back to filePath on the payload.
Dry Run (skip actual delete)OffResolve and validate, then return without deleting.
Allow FoldersOffLet the source be a folder instead of a single file.

Output

Every key is available downstream as {{key}}.

KeyTypeValue
deletedPathStringThe path that was deleted, or would have been in a Dry Run
successBooleanWhether the delete succeeded
dryRunBooleanPresent and true only when Dry Run skipped the deletion

Example: delete the archive once it is uploaded

Zip builds the archive, API Request uploads it, a Condition checks the status is 200, and only then does Delete File remove the local copy.

Five nodes. The archive is only deleted after the upload reports 200.
Five nodes. The archive is only deleted after the upload reports 200.

Paste this into the Flow Builder to get the same flow:

Zip ~/Documents/reports, upload the archive, and delete the local zip only if the upload returned 200.

Good to know

Allow Folders widens the blast radius. These nodes act on one file: a folder as the path is refused until you turn Allow Folders on, and then the whole tree goes with it. Your home folder and its top-level folders — Desktop, Downloads, Documents, Pictures, Movies, Music — are never a source, toggle or not; a file inside one is ordinary. A package like .app counts as a file either way.

This is the one node with no way back. It is destructive by identity: the canvas badge, the palette tint and the inspector banner are always on, and any flow containing it asks for confirmation every time it is armed. Put a Condition in front of it so something has to be true before it runs.