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

# Disconnect from the Sandbox instance

> Gracefully close the WebSocket connection and clean up sandbox resources.

## disconnect()

The `disconnect()` method gracefully terminates your active sandbox session by closing the WebSocket connection and releasing all associated resources.

### `disconnect()`

**Description:**
Gracefully terminates your active sandbox.

**Parameters:**
None

**Returns:**
`Promise<void>` - Resolves when disconnection is complete

**Example:**

```typescript theme={null}
const sandbox = new Sandbox({ apiKey: 'key' })
await sandbox.create({ shouldBackupFilesystem: false })

// Do work...

// Always cleanup
await sandbox.disconnect()
```
