# LibTmux.Server.killWindow

- **Package:** libtmux-haskell
- **Language:** Haskell
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-haskell/blob/72edb54317bf619c6dc54bff311844f062f8984c/src/LibTmux/Server.hs#L903
- **Page:** https://libtmux.org/en/haskell/latest/reference/libtmux-server-v-killwindow/

```haskell
killWindow :: Server -> WindowRef -> IO ()
```

Signature types: [`Server`](/en/haskell/latest/reference/libtmux-server-t-server/), [`WindowRef`](/en/haskell/latest/reference/libtmux-snapshot-t-windowref/), [`IO`](https://hackage.haskell.org/package/base-4.22.0.0/docs/Prelude.html#t:IO).

Remove a physical window across all its links. tmux closes sessions
 left without windows. Use [`killWindowWith`](/en/haskell/latest/reference/libtmux-server-v-killwindowwith/) to choose a deadline.

## Referenced declarations

- [`LibTmux.Server.Server`](/en/haskell/latest/reference/libtmux-server-t-server/) (data type)
- [`LibTmux.Snapshot.WindowRef`](/en/haskell/latest/reference/libtmux-snapshot-t-windowref/) (data type)

## tmux command

The tmux commands behind `killWindow`.

- [`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 `killWindow`.

- [Create sessions, windows and panes](/en/haskell/latest/guides/creation/)
