# libtmux.Pane:clear_history

- **Module:** libtmux
- **Package:** libtmux
- **Language:** Lua
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-lua/blob/d68f829fe097e38dcbbf7147e276666fe615f0cf/lua/libtmux/_internal/entity.lua#L497
- **Page:** https://libtmux.org/en/lua/v0.1.1/reference/libtmux-pane-clear_history/

```
clear_history: fun(
  self: libtmux.Pane,
  options?: libtmux.ClearHistoryOptions,
):libtmux.Request<boolean>
```

## Parameters

- `options` (`libtmux.ClearHistoryOptions?`)

## tmux command

The tmux commands behind `clear_history`.

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

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_clear_history_entry`](/en/tmux/latest/reference/c-variable-cmd_clear_history_entry/) (attribute)
- [`cmd_capture_pane_exec`](/en/tmux/latest/reference/c-function-cmd-capture-pane-c-cmd_capture_pane_exec/) (function)

## Guides

Pages that discuss `clear_history`.

- [Pane operations](/en/lua/v0.1.1/guides/panes/)

## In other ports

Clear a pane's scrollback

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Pane.clear_history`](/en/py/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.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) |

No equivalent is recorded in Ruby, PowerShell, Julia, Elixir, Kotlin, Scala or F#.
