> ## Documentation Index
> Fetch the complete documentation index at: https://novita.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Snapshot

Delete a snapshot you no longer need by its snapshot ID. Deleting a snapshot is permanent — sandboxes already created from it are unaffected, but you can no longer create new sandboxes from it.

***

## Delete a snapshot

The call returns `true` if the snapshot was deleted, or `false` if no snapshot with that ID was found.

<Note>
  **Note:** A snapshot may not be deletable while any running sandboxes were created from it. Kill those sandboxes before deleting the snapshot.
</Note>

<CodeGroup>
  ```python Python icon="python" theme={"system"}
  import os
  from novita_sandbox import Novita

  novita = Novita(api_key=os.getenv("NOVITA_API_KEY", ""))
  snapshot_id = "<snapshotID>"
  deleted = novita.sandbox.delete_snapshot(snapshot_id)
  print("deleted" if deleted else "not found")
  ```

  ```js JavaScript & TypeScript icon="js" theme={"system"}
  import { Novita } from 'novita-sandbox'

  const novita = new Novita({
    apiKey: process.env.NOVITA_API_KEY || '',
  })
  const deleted = await novita.sandbox.deleteSnapshot('<snapshotID>')
  console.log(deleted ? 'deleted' : 'not found')
  ```
</CodeGroup>
