E2B icon

E2B

Run commands and manage E2B sandboxes and snapshots

Snapshot → Delete

AI-generated

Summary

Delete a snapshot from E2B by its Snapshot ID, optionally specifying a timeout for the operation.

Inputs

  • Snapshot ID (required) — The unique identifier of the snapshot to delete.
  • Timeout — Timeout in seconds for the E2B operation (default is 300 seconds).

Output shape

a single JSON object indicating whether the snapshot was successfully deleted, with the snapshot ID and a boolean 'deleted' field.

If the snapshot does not exist, the deletion result will be false; otherwise true if deletion succeeded. Errors are thrown for failed deletion attempts.

Examples

Example 1: Deleting an existing snapshot

Provide the Snapshot ID of the snapshot you wish to delete. Optionally, adjust the timeout duration for the delete operation.

Links

Discussion