# Libtmux_eio.Client.clear_history

- **Module:** Libtmux_eio
- **Package:** libtmux-eio
- **Language:** OCaml
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-ocaml/blob/205dfda49742592b479247049d186956e4a4cfe9/eio/libtmux_eio.mli#L584
- **Public owner:** Libtmux_eio
- **Page:** https://libtmux.org/en/ocaml/latest/reference/libtmux_eio-client-clear_history/

```
val clear_history :
  t -> Libtmux.Pane.target -> (unit, Libtmux.Error.t) result
```

Clear stored scrollback for this pane. The visible screen and running process remain; later captures cannot recover discarded history.

## Parameters

- `arg1` (`t`)
- `arg2` (`Libtmux.Pane.target`)

## 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)

## In other ports

Clear a pane's scrollback

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Pane.clear_history`](/en/py/latest/reference/libtmux-pane-clear_history/) (method) |
| Lua | [`libtmux.Pane:clear_history`](/en/lua/latest/reference/libtmux-pane-clear_history/) (method) |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| 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) |
| Perl | No dedicated equivalent in the selected Perl surface. Explicit Server::cmd remains available for native tmux commands. |

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