# window.Window.kill

- **Module:** window
- **Package:** libtmux
- **Language:** TypeScript
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ts/blob/073b9d7dedad900bff6f5ec0ea47794e40225870/packages/libtmux/src/window.ts#L397
- **Page:** https://libtmux.org/en/ts/latest/reference/window-window-kill/

```
kill(): Promise<void>
```

Destroy this window, unlinking it from every session it is in.

## Examples

```ts
await window.kill();
```

## tmux command

The tmux commands behind `kill`.

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

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