# window.Window.unlink

- **Module:** window.Window
- **Package:** libtmux
- **Language:** TypeScript
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/window.ts#L448
- **Page:** https://libtmux.org/en/ts/latest/reference/window-window-unlink/

```
window.Window.unlink() -> Promise<void>
```

Remove this placement, leaving the window's other placements intact.

For a window linked into several sessions. A window shared because its
sessions are grouped is not linked, and tmux refuses with "window only
linked to one session" — a group member leaves by being killed, not by
unlinking.

## Example

```ts
const destination = await server.newSession({ name: "unlink-example" });
await window.link({ session: destination.id });
const placement = (await server.snapshot()).windows.one({
  id: window.id,
  session: { is: { id: destination.id } },
});
await placement.unlink();
```
