# thalamus drain

Source: https://usecns.dev/thalamus-cli-drain/

[Start here](https://usecns.dev/manual-thalamus/)
[CLI commands](https://usecns.dev/commands-thalamus/)
[Configuration & integration](https://usecns.dev/thalamus-topics/)

Usage: `thalamus drain --name <NAME> --url <BASE_URL>`.

* `--name <NAME>`: required logical member name.
* `--url <BASE_URL>` / `THALAMUS_URL`: required router URL.

POST `/admin/v1/members/{name}/drain`. Prints response JSON; non-success HTTP fails the command. Missing member returns 404. Draining evicts session pins and excludes new selections; it does not cancel already-open streams. There is no CLI undrain or remove subcommand; runtime registration can replace a member, and DELETE is available over HTTP. The CLI interpolates the name into the path; prefer simple URL-safe names.

See [CLI conventions](https://usecns.dev/thalamus-cli-usage/) for shared configuration and exit behavior, or [browse all commands](https://usecns.dev/commands-thalamus/).