# libtmux.Pane.clear_history

- **Module:** libtmux
- **Package:** libtmux
- **Language:** Python
- **Kind:** method
- **Source:** https://github.com/tmux-python/libtmux/blob/38e368c11117fb4aeb2f082d552cd4f210eae06a/src/libtmux/pane.py#L2557
- **Page:** https://libtmux.org/en/py/stable/reference/libtmux-pane-clear_history/

tmux command: [`clear-history`](/en/tmux/latest/manual/clear-history/)

```
libtmux.Pane.clear_history(
    self, reset_hyperlinks: bool | None = None
) -> None
```

Clear pane history buffer via [`$ tmux clear-history`](/en/tmux/latest/manual/clear-history/).

## Examples

```python
>>> pane.clear_history()
```

## Parameters

- `reset_hyperlinks` (`bool | None`): Also reset hyperlinks (``-H`` flag). Requires tmux 3.4+. (added 0.56)

## In other ports

### Clear a pane's scrollback

- Lua: [`libtmux.Pane:clear_history`](/en/lua/latest/reference/libtmux-pane-clear_history/) (method)
- TypeScript: [`pane.Pane.clearHistory`](/en/ts/latest/reference/pane-pane-clearhistory/) (method)
- Rust: [`pane.Pane.clear_history`](/en/rs/latest/reference/pane-pane-clear_history/) (method)
- Go: [`tmux.Pane.ClearHistory`](/en/go/latest/reference/tmux-pane-clearhistory/) (method)
- Java: [`io.github.libtmux.Pane.Pane.clearHistory`](/en/java/latest/reference/io-github-libtmux-pane-pane-clearhistory/) (method)
- C#: [`LibTmux.Pane.ClearHistoryAsync`](/en/csharp/latest/reference/libtmux-pane-clearhistoryasync/) (method)
- C++: [`libtmux::Pane::clear_history`](/en/cxx/latest/reference/libtmux-pane-clear_history/) (method)
- Swift: [`Server.clearHistory(_:)`](/en/swift/latest/reference/server-clearhistory(_-)/) (method)
