# io.github.libtmux.PrivateDaemon.close

- **Module:** io.github.libtmux
- **Package:** io.github.libtmux:libtmux
- **Language:** Java
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-java/blob/851a1b7f1f9b9b2bf0fa9f578de78acd3631f33d/libtmux/src/main/java/io/github/libtmux/PrivateDaemon.java#L205
- **Page:** https://libtmux.org/en/java/latest/reference/io-github-libtmux-privatedaemon-privatedaemon-close/

```
void close()
```

Ends the daemon, then any server left under the directory, and removes the directory.

## Errors

- [`IllegalStateException`](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/IllegalStateException.html): if a server still answers, in which case the directory stays, or if a program left a server running, which is stopped first
