# tmux.Session.Kill

- **Module:** tmux.Session
- **Package:** github.com/libtmux/libtmux-go/tmux
- **Language:** Go
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-go/blob/5f808882015a975a65acc7f9da5b3ff0d5cbdc91/tmux/lifecycle_kill.go#L94
- **Page:** https://libtmux.org/reference/go/tmux-session-kill/

```
tmux.Session.Kill(ctx: context.Context) -> error
```

Kill destroys the receiver session and removes its winlinks. Ordinary attached clients detach; on tmux 3.6 or later, clients carrying no-detach-on-destroy move to another session when one exists. A window with no remaining links and all of that window's panes are also destroyed. The materialized receiver is not refreshed. Only stderr makes a completed command a [CommandError]; nonzero exits without stderr are ignored. Transport errors are delivery-ambiguous. Kill is equivalent to [Session.KillWith] with a zero [SessionKillRequest].
