> ## Documentation Index
> Fetch the complete documentation index at: https://e2b.manicule.dev/llms.txt
> Use this file to discover all available pages before exploring further.
> For every page in one file, fetch https://e2b.manicule.dev/llms-full.txt (large).
> To search and read these docs as tools, connect the MCP server at https://e2b.manicule.dev/api/mcp.
> Every agent surface: https://e2b.manicule.dev/.well-known/llms-manifest.json

# Shutdown running sandboxes (/docs/cli/shutdown-sandboxes)

<!-- agent-signals: reading_time_min: 1 · est_tokens: 228 · updated: 2026-07-30 -->
Related: [Authentication in CLI](/docs/cli/auth.md), [Connect to sandbox](/docs/cli/connect-to-sandbox.md), [Create sandbox](/docs/cli/create-sandbox.md), [Execute commands in sandbox](/docs/cli/exec-command.md), [List sandboxes](/docs/cli/list-sandboxes.md), [BYOC (Bring Your Own Cloud)](/docs/byoc.md)

You can shutdown single or all running sandboxes with the E2B CLI.

## Shutdown single or multiple sandboxes

To shutdown a single or multiple sandboxes, run the following command:

<CodeGroup>
```bash title="Terminal" terminal
e2b sandbox kill <sandbox-id1> <sandbox-id2> <sandbox-id3>
```
</CodeGroup>

## Shutdown all sandboxes

To shutdown all running sandboxes, run the following command:

<CodeGroup>
```bash title="Terminal" terminal
e2b sandbox kill --all
```
</CodeGroup>

Further, you can filter the sandboxes to be shutdown by state, metadata or both.

<CodeGroup>
```bash title="Terminal" terminal
e2b sandbox kill --all --state=running,paused
```
</CodeGroup>

<CodeGroup>
```bash title="Terminal" terminal
e2b sandbox kill --all --metadata=key=value
```
</CodeGroup>

<CodeGroup>
```bash title="Terminal" terminal
e2b sandbox kill --all --state=running,paused --metadata=key=value
```
</CodeGroup>
