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

# Delete a Secret

`novita.secret.delete()` deletes an active Secret by name. A deleted Secret can no longer be referenced by new sandbox create, resume, or clone operations; already-running sandboxes are not rewritten. It returns the name of the deleted Secret.

## Example

```python Python icon="python" theme={"system"}
from novita_sandbox import Novita

secret_name = "<your-secret-name>"

novita = Novita()

deleted_name = novita.secret.delete(secret_name)
print("Deleted:", deleted_name)
```

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

const secretName = '<your-secret-name>'

const novita = new Novita()

const deletedName = await novita.secret.delete(secretName)
console.log('Deleted:', deletedName)
```

```bash CLI icon="terminal" theme={"system"}
novita secret delete <secret_name>
```

> [!NOTE]
>
> Deleting a Secret does not rewrite already-running sandboxes; it only prevents new create, resume, and clone operations from referencing it. The underlying retired value is cleaned up asynchronously once no active execution authorization references it. You can reuse the same name to create a new Secret, which gets a new version and placeholder.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.