# libtmux.Server.clear_prompt_history

- **Module:** libtmux.Server
- **Package:** libtmux
- **Language:** Python
- **Kind:** method
- **Source:** https://github.com/tmux-python/libtmux/blob/036c521c4b83ce6e434eb50afe2a0d08a6a05e46/src/libtmux/server.py#L1776
- **Page:** https://libtmux.org/reference/py/libtmux-server-clear_prompt_history/

```
libtmux.Server.clear_prompt_history(self, prompt_type: t.Literal["command", "search", "target", "window-target"] | None = None) -> None
```

Clear prompt history via ``$ tmux clear-prompt-history``.

## Parameters

- `self`
- `prompt_type` (t.Literal["command", "search", "target", "window-target"] | None) — Prompt type to clear (``-T`` flag).

## Example

```python
>>> from libtmux.common import has_gte_version
>>> if has_gte_version("3.3"):
...     server.clear_prompt_history()
```
