# Libtmux_eio.Client.kill_window

- **Module:** Libtmux_eio
- **Package:** libtmux-eio
- **Language:** OCaml
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-ocaml/blob/205dfda49742592b479247049d186956e4a4cfe9/eio/libtmux_eio.mli#L459
- **Public owner:** Libtmux_eio
- **Page:** https://libtmux.org/en/ocaml/latest/reference/libtmux_eio-client-kill_window/

```
val kill_window :
  t -> Libtmux.Window.target -> (unit, Libtmux.Error.t) result
```

Destroy the window, all its session links and every contained pane. This acts on the global window, not a single contextual link.

## Parameters

- `arg1` (`t`)
- `arg2` (`Libtmux.Window.target`)

## tmux command

The tmux commands behind `kill_window`.

- [`kill-window`](/en/tmux/latest/manual/kill-window/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_kill_window_entry`](/en/tmux/latest/reference/c-variable-cmd_kill_window_entry/) (attribute)
- [`cmd_kill_window_exec`](/en/tmux/latest/reference/c-function-cmd-kill-window-c-cmd_kill_window_exec/) (function)

## In other ports

Close a window

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Window.kill`](/en/py/latest/reference/libtmux-window-kill/) (method) |
| Ruby | [`LibTmux::Window#kill`](/en/ruby/latest/reference/libtmux-window-kill/) (method) |
| Lua | [`libtmux.Window:kill`](/en/lua/latest/reference/libtmux-window-kill/) (method) |
| Erlang | [`tmux_window:kill/1`](/en/erlang/latest/reference/tmux_window-kill-1/) (function). Removes the physical window and its memberships. |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | [`window.Window.kill`](/en/ts/latest/reference/window-window-kill/) (method) |
| Rust | [`window.Window.kill`](/en/rs/latest/reference/window-window-kill/) (method) |
| Go | [`tmux.Window.Kill`](/en/go/latest/reference/tmux-window-kill/) (method) |
| Java | [`io.github.libtmux.Window.kill`](/en/java/latest/reference/io-github-libtmux-window-window-kill/) (method) |
| C# | [`LibTmux.Window.KillAsync`](/en/csharp/latest/reference/libtmux-window-killasync/) (method) |
| C++ | [`libtmux::Window::kill`](/en/cxx/latest/reference/libtmux-window-kill/) (method) |
| Swift | [`Server.kill(_:)`](/en/swift/latest/reference/server-kill(_-)/) (method) |
| Perl | [`LibTmux::Server::kill_window`](/en/perl/latest/reference/libtmux-server-kill_window/) (method). Explicit Server operation. Captured entities remain local observations; use a new snapshot to observe changes. |

No equivalent is recorded in PowerShell, Julia, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.
