# io.github.libtmux.Server.Server.killSession

- **Module:** io.github.libtmux.Server.Server
- **Package:** io.github.libtmux:libtmux
- **Language:** Java
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-java/blob/842228310449e879ebcaa3f910597757c9dbffd6/libtmux/src/main/java/io/github/libtmux/Server.java#L180
- **Page:** https://libtmux.org/en/java/latest/reference/io-github-libtmux-server-server-killsession/

```
io.github.libtmux.Server.Server.killSession(name: String) -> void
```

Ends the session with this name, and everything in it.

The name is matched exactly. tmux would otherwise take a prefix, so asking to kill
{@code build} could end {@code build-cache} instead.

## Raises

- `LibTmuxException`: if no session carries the name
