# program.Program.kill

- **Module:** program
- **Package:** libtmux
- **Language:** TypeScript
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ts/blob/ad09eaef7ffff40f510989ee0695852c44a31576/packages/libtmux/src/program.ts#L124
- **Page:** https://libtmux.org/en/ts/latest/reference/program-program-kill/

```
kill(): Promise<void>
```

End the program and remove its pane, unless kept.

Every call waits for the same end. A running program gets SIGTERM and,
two seconds later, SIGKILL, sent to its process group on the tmux
server's machine, so one that ignores SIGHUP still ends.

## Examples

```ts
const program = await server.spawn(["sleep", "30"]);
await program.kill();
```
