# libtmux.Server.unset_option

- **Module:** libtmux
- **Package:** libtmux
- **Language:** Python
- **Kind:** method
- **Source:** https://github.com/tmux-python/libtmux/blob/38e368c11117fb4aeb2f082d552cd4f210eae06a/src/libtmux/options.py#L716
- **Inherited from:** libtmux.options.OptionsMixin
- **Page:** https://libtmux.org/en/py/stable/reference/libtmux-server-unset_option/

tmux catalog: [Options](/en/tmux/latest/catalog/options/)

```
libtmux.Server.unset_option(
    self,
    option: str,
    unset_panes: bool | None = None,
    global_: bool | None = None,
    ignore_errors: bool | None = None,
    scope: OptionScope
    | _DefaultOptionScope
    | None = DEFAULT_OPTION_SCOPE,
) -> Self
```

Unset option for tmux target.

Wraps [`$ tmux set-option -u <option>`](/en/tmux/latest/manual/set-option/) / [`$ tmux set-option -U <option>`](/en/tmux/latest/manual/set-option/)

## Examples

```python
>>> import typing as t
>>> from libtmux.common import tmux_cmd
>>> from libtmux.constants import OptionScope
```

```python
>>> class MyServer(OptionsMixin):
...     socket_name = server.socket_name
...     def cmd(self, cmd: str, *args: object):
...         cmd_args: t.List[t.Union[str, int]] = [cmd]
...         if self.socket_name:
...             cmd_args.insert(0, f"-L{self.socket_name}")
...         cmd_args.insert(0, "-f/dev/null")
...         return tmux_cmd(*cmd_args, *args)
...
...     default_option_scope = OptionScope.Server
```

```python
>>> MyServer().set_option('escape-time', 1250)
<libtmux.options.MyServer object at ...>
```

```python
>>> MyServer()._show_option('escape-time')
1250
```

```python
>>> MyServer().unset_option('escape-time')
<libtmux.options.MyServer object at ...>
```

```python
>>> isinstance(MyServer()._show_option('escape-time'), int)
True
```

## Parameters

- `option` (`str`): option to unset, e.g. 'aggressive-resize'
- `unset_panes` (`bool | None`)
- `global_` (`bool | None`)
- `ignore_errors` (`bool | None`)
- `scope` (`OptionScope | _DefaultOptionScope | None`)

## Raises

- [`exc.OptionError`](/en/py/stable/reference/libtmux-exc-optionerror/)
- [`exc.UnknownOption`](/en/py/stable/reference/libtmux-exc-unknownoption/)
- [`exc.InvalidOption`](/en/py/stable/reference/libtmux-exc-invalidoption/)
- [`exc.AmbiguousOption`](/en/py/stable/reference/libtmux-exc-ambiguousoption/)

## In other ports

### Unset a server option

- Lua: [`libtmux.Server:unset_option`](/en/lua/latest/reference/libtmux-server-unset_option/) (method)
- TypeScript: [`server.Server.unsetOption`](/en/ts/latest/reference/server-server-unsetoption/) (method)
- Rust: [`server.Server.unset_option`](/en/rs/latest/reference/server-server-unset_option/) (method)
- Go: [`tmux.Server.UnsetOption`](/en/go/latest/reference/tmux-server-unsetoption/) (method)
- Swift: [`Server.unsetOption(_:scope:)`](/en/swift/latest/reference/server-unsetoption(_-scope-)/) (method)
