Delete a File
Delete a File removes one file from a workspace file store. You find it on the
node picker’s Storage shelf.
The node has one input handle and one output handle.
What “delete” means here
Section titled “What “delete” means here”The file stops being readable immediately: it disappears from List Files, and its path is free to use again. Its stored contents are deleted by the next daily cleanup, not at the moment you delete. Publicus offers no way to restore a deleted file, so treat a delete as final.
Files in a store Publicus manages, such as Mail attachments, cannot be deleted one at a time. They belong to the email they arrived with and are removed by that store’s retention. The node stops with an error that says so.
Picking the file
Section titled “Picking the file”In the node’s settings you pick the file to remove rather than type its
reference. Type part of its path, and the field lists the matching files of
every file store in your workspace as Store › path, the newest first, 50 at
most. A picked file is saved as its object id. A Store name/path typed in
before the field became a picker stays as it was. To remove a file another node
names, click Insert a value ({x}) and write an expression.
Configuration
Section titled “Configuration”

| Field | Type | Default | Description |
|---|---|---|---|
File (reference) | string ✦ (required) | — | The file to remove: an object id, or “Store name/path/to/file.pdf”. |
Fields marked ✦ accept expressions.
Try this node — run it once against your own workspace, with your credentials, without building a flow first.
Two references are refused, each with the reason:
- A version id. A version names one byte set inside a file’s history, not
the file. Delete the file by its object id or its
Store/path, or set the store’s retention policy to age versions out. - An email attachment id. An inbound attachment belongs to the message it arrived on and is removed with it by mail retention.
Output
Section titled “Output”{ "deleted": { "id": "01K2...", "key": "invoices/2026/08/inv-1042.pdf", "storeId": "01K1..." }}Worked example
Section titled “Worked example”Clear a working file once a flow has finished with it:
- File:
{{ $prev->object->id }}, taken from the Store a File node that wrote it.
Addressing it by path works too, and reads better when the path is fixed:
Scratch/exports/nightly.csv.
Limitations
Section titled “Limitations”- One file per run of the node. To clear many, list them and fan out with Parallel.
- Deleting a file the flow is still using elsewhere in the same run is not detected.
Related
Section titled “Related”- List Files: find the files to remove.
- File Details: check a file before removing it.
- Store a File: put a file into a store.
- Approvals: gating this node when an agent calls it.
- Files: creating a store, retention, versions and sharing.