# Server.unsetHook(_:in:)

- **Module:** Server
- **Package:** libtmux-swift
- **Language:** Swift
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-swift/blob/f02a4668570e1cc5198c941413750e021f42c214/Sources/LibTmux/Options.swift#L241
- **Page:** https://libtmux.org/reference/swift/server-unsethook(_-in-)/

```
Server.unsetHook(_:in:)(name: String, in: HookScope) -> TmuxReply
```

Unbinds every command from a hook.

In the global table tmux empties the array but keeps listing the name,
so an unset hook reads as a name with nothing behind it — which is what
an unbound name looks like to begin with, and why ``hooks(_:)`` reports
neither. Unsetting a name nothing was bound to succeeds.

## Raises

- `TmuxError`
