---
title: "Destroy every live sandbox on a worker node, from all owners, so the node can be removed. Works on a node that is offline for good: its sandboxes are marked destroyed even when the node cannot be reached. Admin only."
method: POST
path: "/v1/sandboxes/placement/nodes/{node}/evict"
tags: ["Sandboxes"]
---

# Destroy every live sandbox on a worker node, from all owners, so the node can be removed. Works on a node that is offline for good: its sandboxes are marked destroyed even when the node cannot be reached. Admin only.

`POST /v1/sandboxes/placement/nodes/{node}/evict`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/v1/sandboxes/placement/nodes/{node}/evict`
- Auth: HTTP bearer

## Path parameters

- `node` string, required

## Response `200`

Sandboxes destroyed

- NodeEvictionResponse: `POST /v1/sandboxes/placement/nodes/{node}/evict`
  - `containers_unconfirmed` EvictionUnconfirmedContainer[], required: Destroyed sandboxes whose container the node did not confirm removing: it may still be running there. Check the node, or remove it if it is gone for good.
    - `cleanup_command` string, required: Run this on the node, if it comes back, to remove the sandbox's leftover containers. Nothing else will: the sandbox is destroyed, and its containers are not listed anywhere in Temps.
    - `reason` string, required
    - `sandbox_id` string, required
  - `destroyed` string[], required: Public ids of the sandboxes destroyed (their rows are gone, and they no longer block removing the node).
  - `node` PlacementNode, required: One row of `GET /sandboxes/placement`.
    - `allowed` boolean, required: Allowed by the operator's sandbox placement settings.
    - `backends` NodeBackend[]: Every backend a sandbox can ask for, and whether this node can run it. A node that cannot says why, so a client can show the choice and its fix rather than hide it.
      - `available` boolean, required
      - `backend` 'docker' | 'firecracker' | 'microsandbox' | 'local', required: Which isolation backend a sandbox runs on (ADR-029, ADR-050). Docker containers, Firecracker microVMs and microsandbox (libkrun) microVMs coexist on the same host behind the same `SandboxProvider` seam; `routing::RoutingSandboxProvider` dispatches between them. `Local` is the dev-only fork-exec fallback.
      - `reason` string, nullable: Why the node cannot run it, and how to fix that when it can be fixed.
    - `dedicated` boolean: Labelled `temps.sh/role=dedicated`: automatic placement never picks it, but a sandbox that requests it by id or name may still run there when it is `eligible`. Always `false` for the control plane.
    - `eligible` boolean, required: Can take a new sandbox right now (allowed and active).
    - `id` integer, required: Node id; `0` for the control plane.
    - `is_control_plane` boolean, required
    - `live_sandboxes` integer, required: Sandboxes currently hosted on the node (not destroyed).
    - `name` string, required
    - `reason` string, nullable: Why the node is not eligible, when it isn't.
    - `status` string, required: Node status (`active`, `offline`, `draining`, …). Always `active` for the control plane.

## Other responses

- `400`: The control plane cannot be evicted
- `401`: Unauthorized
- `403`: Administrator role required
- `404`: No such worker node
- `409`: An eviction of this node is already running
- `428`: Recent MFA verification required (browser sessions)
- `503`: Some sandboxes could not be destroyed; `destroyed`, `containers_unconfirmed` and `failed` list them, and retrying picks the failed ones up

## Changes

- **2026-10-28** `b8d51a990805`: 1 info
  - added the optional property `node/backends` to the response with the `200` status
- **2026-10-09** `a2e5a08b4347`: 1 info
  - added the optional property `node/dedicated` to the response with the `200` status
- **2026-10-05** `4b228ebed583`: 1 info
  - endpoint added
- **2026-10-05** `63a80791dc58`: 1 breaking
  - api path removed without deprecation
- **2026-10-02** `185fa8a10fca`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/v1/sandboxes/placement/nodes/:node/evict/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
