# LibTmux.Window.UnlinkAsync

- **Module:** LibTmux.Window
- **Package:** LibTmux
- **Language:** .NET
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/6656a563ec9e07ab52e0c3ac96f7704fc94cc0c0/src/LibTmux/Window.Links.cs#L68
- **Page:** https://libtmux.org/reference/dotnet/libtmux-window-unlinkasync/

```
LibTmux.Window.UnlinkAsync(killIfLast: bool, cancellationToken: CancellationToken) -> Task
```

Removes this window's link to the session it was read through.

tmux refuses to unlink a window that belongs to only one session unless
it is allowed to destroy it.

## Parameters

- `killIfLast` (bool) — Whether the window dies when this was its last link.
- `cancellationToken` (CancellationToken) — Cancels the tmux command.
