# LibTmux::Configuration::Hooks.unset

- **Module:** LibTmux::Configuration
- **Package:** LibTmux
- **Language:** Raku
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-raku/blob/0b5dd3d32e20f83a0069874e33eab0eb48f55962/lib/LibTmux/Configuration.rakumod#L504
- **Page:** https://libtmux.org/en/raku/latest/reference/libtmux-configuration-hooks-unset/

```
method unset(Str:D $name, Count :$index = Count --> Result:D)
```

Remove a hook array or one explicit index.

Remove a hook array or one explicit index.

## Parameters

- `$name` (`Str:D`)
- `$index?` (`Count`)

## tmux command

The tmux commands behind `unset`.

- [`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) |
| OCaml | [`Libtmux_unix.Client.remove_hook`](/en/ocaml/latest/reference/libtmux_unix-client-remove_hook/) (function) |
| 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) |
| OCaml | [`Libtmux_unix.Client.remove_hook`](/en/ocaml/latest/reference/libtmux_unix-client-remove_hook/) (function) |
| 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) |
| OCaml | [`Libtmux_unix.Client.remove_hook`](/en/ocaml/latest/reference/libtmux_unix-client-remove_hook/) (function) |
| 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) |
| OCaml | [`Libtmux_unix.Client.remove_hook`](/en/ocaml/latest/reference/libtmux_unix-client-remove_hook/) (function) |
| 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#.
