Skip to main content
Destroy stops a sandbox and releases its active runtime resources. Use it when you do not need the current VM state anymore, or after you have hibernated or copied out the state you want to keep.

What state changes

  • The sandbox leaves the running set and stops accepting commands.
  • Public port routing for that sandbox is removed.
  • Shared volumes and snapshots remain independent resources until deleted.

Usage

from nullspace import Sandbox

sandbox = Sandbox.create(template="base")
try:
    print(sandbox.commands.run("hostname", shell=True).stdout.strip())
finally:
    sandbox.kill()
API reference: destroySandbox (DELETE /v1/sandboxes/{id}). Guide: Sandboxes. Example: Examples.