# tmux.Server.Kill

- **Module:** tmux.Server
- **Package:** github.com/libtmux/libtmux-go/tmux
- **Language:** Go
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-go/blob/52968a3181c1c9e6d1b26c565d4b170968ae61c0/tmux/lifecycle_kill.go#L51
- **Page:** https://libtmux.org/en/go/latest/reference/tmux-server-kill/

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

Kill terminates the configured tmux server and all of its sessions, windows, panes, and clients. After a completed failed kill, a liveness probe makes repeated calls harmless when no daemon answers. Transport or context errors can be delivery-ambiguous; no rollback is attempted.

tmux leaves the socket file in place, so cleanup that waits for the path to
disappear does not finish. Use [Server.IsAlive] to observe the daemon, and
remove a socket path this process chose itself.
