# 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/5f808882015a975a65acc7f9da5b3ff0d5cbdc91/tmux/lifecycle_kill.go#L51
- **Page:** https://libtmux.org/reference/go/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.
