Daytona icon

Daytona

Manage Daytona sandboxes, snapshots, and volumes; run code and shell commands; drive a full Git pipeline; and manage the sandbox filesystem

File → Delete

AI-generated

Summary

Delete a file or directory at a specified absolute path inside a given sandbox, optionally deleting directories recursively if they are not empty.

Inputs

  • Sandbox ID (required) — ID of the sandbox containing the file or directory to delete.
  • Path (required) — Absolute path inside the sandbox of the file or directory to delete.
  • Recursive — Boolean flag indicating whether to delete directories and their contents recursively; set to true to delete non-empty directories.

Output shape

a single JSON object indicating success and echoing input parameters

The output JSON includes the keys: success (boolean), sandboxId (string), path (string), and recursive (boolean). The operation does not return file details or error information beyond success flag; errors are thrown by the node if failed.

Examples

Example 1: Deleting a single file

Provide sandboxId, specify file path, leave Recursive as false

Example 2: Deleting a non-empty directory

Provide sandboxId, specify directory path, set Recursive to true to remove directory contents

Links

Discussion