# pane.Pane.kill

- **Module:** pane.Pane
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/8a648c0894dfffc9303583f753b6c8ae01f2fe76/crates/libtmux/src/pane.rs#L663
- **Page:** https://libtmux.org/reference/rs/pane-pane-kill/

```
pane.Pane.kill(self) -> Result<(), Error>
```

Kill the pane.

This consumes the handle. Killing a window's last pane closes the
window.

# Errors

Returns an error when tmux refuses the command.
