# LibTmux.Pane.kill/3

- **Module:** LibTmux
- **Package:** libtmux
- **Language:** Elixir
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-elixir/blob/00d34b3d387da72a5a416f1dd3962a98c76cedd2/lib/libtmux/entities.ex#L632
- **Page:** https://libtmux.org/en/elixir/latest/reference/libtmux-pane-kill-3/

```
kill(connection, ref, options \\ [])
@spec kill(LibTmux.Server.t(), LibTmux.Ref.t(), [
        LibTmux.Action.option()
      ]) ::
        {:ok, LibTmux.Action.result(:ok)}
        | {:error, LibTmux.Action.error()}
```

Kills an exact pane through one-shot execution.

Returns `{:ok, result}` on command completion. Optional `session: session_ref` requires the pane's window to belong to that exact session and `timeout` defaults to 5000ms. The reference is
checked against the answering server before dispatch, with the usual one-shot
check/use race. A reference to something that is already gone returns
`{:error, %LibTmux.Action.CompletionError{}}` with the original evidence.
Control connections return `unsupported_transport` before any I/O: a
connection cannot kill what it is attached to. Observations you already hold
keep describing the pane.

    alias LibTmux.Pane

    Pane.kill(server, pane_ref)

## Parameters

- `connection` (`LibTmux.Server.t()`)
- `ref` (`LibTmux.Ref.t()`)
- `options` (`[LibTmux.Action.option()]`)
  Default: `[]`.

## Guides

Pages that discuss `kill/3`.

- [Getting started](/en/elixir/latest/guides/overview/)
