# libtmux:unlink-window

- **Package:** libtmux
- **Language:** Common Lisp
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-lisp/blob/c2e5fc4ed3befda21f45dfa5d5868c38fd138311/src/placement.lisp#L64
- **Public owner:** libtmux
- **Page:** https://libtmux.org/en/lisp/latest/reference/libtmux-unlink-window/

```
(unlink-window client link &key kill-if-last cancel-token timeout output-limit)
```

Remove the captured LINK and return a COMMAND-OUTCOME without a value.
Tmux refuses the last reference unless KILL-IF-LAST is explicit; group membership
affects that check. Removing a last link can destroy its window and session.
Signals STALE-TARGET or an operational condition. Does not refresh a deleted link.

## Parameters

- `client`
- `link`
- `kill-if-last?`
- `cancel-token?`
- `timeout?`
- `output-limit?`

## tmux command

The tmux commands behind `unlink-window`.

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

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_unlink_window_entry`](/en/tmux/latest/reference/c-variable-cmd_unlink_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 `unlink-window`.

- [Explicit operations](/en/lisp/latest/guides/operations/)
