# Libtmux_eio.Client.remove_hook

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

```
val remove_hook :
  ?index:int ->
  t -> Libtmux.Options.scope -> string -> (unit, Libtmux.Error.t) result
```

Remove the local hook or one indexed array entry. An inherited hook may become effective again; this does not stop work it already started.

## Parameters

- `index?` (`int`)
- `arg1` (`t`)
- `arg2` (`Libtmux.Options.scope`)
- `arg3` (`string`)

## tmux command

The tmux commands behind `remove_hook`.

- [`set-hook`](/en/tmux/latest/manual/set-hook/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_set_hook_entry`](/en/tmux/latest/reference/c-variable-cmd_set_hook_entry/) (attribute)
- [`cmd_set_option_exec`](/en/tmux/latest/reference/c-function-cmd-set-option-c-cmd_set_option_exec/) (function)

## tmux hooks

Events that run tmux commands, with the scope each hook belongs to and where tmux fires it.

- [Hooks](/en/tmux/latest/catalog/hooks/) (hook)

## In other ports

Unbind a global hook

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Server.unset_hook`](/en/py/latest/reference/libtmux-server-unset_hook/) (method) |
| Lua | [`libtmux.Server:unset_hook`](/en/lua/latest/reference/libtmux-server-unset_hook/) (method) |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | [`server.Server.unsetHook`](/en/ts/latest/reference/server-server-unsethook/) (method) |
| Rust | [`server.Server.unset_hook`](/en/rs/latest/reference/server-server-unset_hook/) (method) |
| Go | no equivalent on `Server` |
| Java | reached through `Server.hooks`, whose `Hooks` carries the write |
| C# | reached through `Server.Hooks`, whose `TmuxHooks` carries the write |
| C++ | no equivalent on `Server` |
| Swift | [`Server.unsetHook(_:in:)`](/en/swift/latest/reference/server-unsethook(_-in-)/) (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#.

Unbind a session hook

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Session.unset_hook`](/en/py/latest/reference/libtmux-session-unset_hook/) (method) |
| Lua | [`libtmux.Session:unset_hook`](/en/lua/latest/reference/libtmux-session-unset_hook/) (method) |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | [`session.Session.unsetHook`](/en/ts/latest/reference/session-session-unsethook/) (method) |
| Rust | [`session.Session.unset_hook`](/en/rs/latest/reference/session-session-unset_hook/) (method) |
| Go | [`tmux.Session.UnsetHook`](/en/go/latest/reference/tmux-session-unsethook/) (method) |
| Java | reached through `Session.hooks`, whose `Hooks` carries the write |
| C# | reached through `Session.Hooks`, whose `TmuxHooks` carries the write |
| C++ | no equivalent on `Session` |
| Swift | [`Server.unsetHook(_:in:)`](/en/swift/latest/reference/server-unsethook(_-in-)/) (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#.

Unbind a window hook

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Window.unset_hook`](/en/py/latest/reference/libtmux-window-unset_hook/) (method) |
| Lua | [`libtmux.Window:unset_hook`](/en/lua/latest/reference/libtmux-window-unset_hook/) (method) |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | [`window.Window.unsetHook`](/en/ts/latest/reference/window-window-unsethook/) (method) |
| Rust | [`window.Window.unset_hook`](/en/rs/latest/reference/window-window-unset_hook/) (method) |
| Go | [`tmux.Window.UnsetHook`](/en/go/latest/reference/tmux-window-unsethook/) (method) |
| Java | reached through `Window.hooks`, whose `Hooks` carries the write |
| C# | reached through `Window.Hooks`, whose `TmuxHooks` carries the write |
| C++ | no equivalent on `Window` |
| Swift | [`Server.unsetHook(_:in:)`](/en/swift/latest/reference/server-unsethook(_-in-)/) (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#.

Unbind a pane hook

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Pane.unset_hook`](/en/py/latest/reference/libtmux-pane-unset_hook/) (method) |
| Lua | [`libtmux.Pane:unset_hook`](/en/lua/latest/reference/libtmux-pane-unset_hook/) (method) |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | [`pane.Pane.unsetHook`](/en/ts/latest/reference/pane-pane-unsethook/) (method) |
| Rust | [`pane.Pane.unset_hook`](/en/rs/latest/reference/pane-pane-unset_hook/) (method) |
| Go | [`tmux.Pane.UnsetHook`](/en/go/latest/reference/tmux-pane-unsethook/) (method) |
| Java | reached through `Pane.hooks`, whose `Hooks` carries the write |
| C# | reached through `Pane.Hooks`, whose `TmuxHooks` carries the write |
| C++ | no equivalent on `Pane` |
| Swift | [`Server.unsetHook(_:in:)`](/en/swift/latest/reference/server-unsethook(_-in-)/) (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#.
