# destroy-unattached

Source: https://libtmux.org/en/tmux/3.2a/catalog/options/destroy-unattached/

> If enabled and the session is no longer attached to any clients, it is destroyed.

option tmux3.2a

If enabled and the session is no longer attached to any clients, it is destroyed.

* Scope

  session

* Type

  Flag (on or off)

* Default

  `off`

* Set

  [`set-option`](https://libtmux.org/en/tmux/3.2a/manual/set-option/) `destroy-unattached value`

* Read

  [`show-options`](https://libtmux.org/en/tmux/3.2a/manual/show-options/) `destroy-unattached`

## Description[#](https://libtmux.org/en/tmux/3.2a/catalog/options/destroy-unattached/#description)

If enabled and the session is no longer attached to any clients, it is destroyed.

## Releases[#](https://libtmux.org/en/tmux/3.2a/catalog/options/destroy-unattached/#releases)

* [tmux 3.7c](https://libtmux.org/en/tmux/3.7c/catalog/options/destroy-unattached/) : type flag to choice; values now off, on, keep-last, keep-group
* [tmux 3.2a](https://libtmux.org/en/tmux/3.2a/catalog/options/destroy-unattached/) : present

## Source[#](https://libtmux.org/en/tmux/3.2a/catalog/options/destroy-unattached/#source)

* Defined in

  [`options-table.c:405`](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/options-table.c#L405)

* C source reference

  [`options_table`](https://libtmux.org/en/tmux/3.2a/reference/c-variable-options_table/)

* CLI Manual

  [Original manual entry](https://libtmux.org/en/tmux/3.2a/manual/full/#options-destroy-unattached)

## Used by[#](https://libtmux.org/en/tmux/3.2a/catalog/options/destroy-unattached/#used-by)

Library documentation that names this option.

* Rust

  [`options.generated.DESTROY_UNATTACHED`](https://libtmux.org/en/rs/latest/reference/options-generated-destroy_unattached/)

* Go

  [`tmux.Connection`](https://libtmux.org/en/go/latest/reference/tmux-connection/), [`tmux.DestroyUnattached`](https://libtmux.org/en/go/latest/reference/tmux-destroyunattached/), [`tmux.GlobalSessionScope.SetDestroyUnattached`](https://libtmux.org/en/go/latest/reference/tmux-globalsessionscope-setdestroyunattached/), [`tmux.Session.SetDestroyUnattached`](https://libtmux.org/en/go/latest/reference/tmux-session-setdestroyunattached/), [`tmux.SessionOptionValues.DestroyUnattached`](https://libtmux.org/en/go/latest/reference/tmux-sessionoptionvalues-destroyunattached/)

* C#

  [`LibTmux.Session.HoldWaitClientAsync`](https://libtmux.org/en/csharp/latest/reference/libtmux-session-holdwaitclientasync/)
