Shutdown running sandboxes

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:

Terminal
e2b sandbox kill <sandbox-id1> <sandbox-id2> <sandbox-id3>

Shutdown all sandboxes

To shutdown all running sandboxes, run the following command:

Terminal
e2b sandbox kill --all

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

Terminal
e2b sandbox kill --all --state=running,paused
Terminal
e2b sandbox kill --all --metadata=key=value
Terminal
e2b sandbox kill --all --state=running,paused --metadata=key=value