# tmux_window:kill/1

- **Package:** libtmux_erlang
- **Language:** Erlang
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-erlang/blob/d1b6308440cf9eb8f6647e7ae434bce60e849368/apps/libtmux_erlang/src/tmux_window.erl#L74
- **Page:** https://libtmux.org/en/erlang/latest/reference/tmux_window-kill-1/

```
kill(Window)
-spec kill(tmux_model:window()) ->
              {ok, map()} | {error, map()}.
```

Destroy the physical window and all of its session links. This does not unlink only one membership. Performs I/O after origin and target validation.

## Parameters

- `Window` (`tmux_model:window()`)

## tmux command

The tmux commands behind `kill/1`.

- [`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)

## Guides

Pages that discuss `kill/1`.

- [Object graph](/en/erlang/latest/concepts/object-graph/)

## 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) |
| 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) |
| OCaml | [`Libtmux_unix.Client.kill_window`](/en/ocaml/latest/reference/libtmux_unix-client-kill_window/) (function) |
| 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#.
