# libtmux.Session:remove_environment

- **Module:** libtmux
- **Package:** libtmux
- **Language:** Lua
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-lua/blob/d68f829fe097e38dcbbf7147e276666fe615f0cf/lua/libtmux/_internal/entity.lua#L445
- **Page:** https://libtmux.org/en/lua/v0.1.1/reference/libtmux-session-remove_environment/

```
remove_environment: fun(
  self: libtmux.Session,
  name: string,
  options?: libtmux.EnvironmentOptions,
):libtmux.Request<boolean>
```

## Parameters

- `name` (`string`)
- `options` (`libtmux.EnvironmentOptions?`):  What every environment operation accepts; unset and remove take no more.

## tmux command

The tmux commands behind `remove_environment`.

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

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_set_environment_entry`](/en/tmux/latest/reference/c-variable-cmd_set_environment_entry/) (attribute)
- [`cmd_set_environment_exec`](/en/tmux/latest/reference/c-function-cmd-set-environment-c-cmd_set_environment_exec/) (function)

## In other ports

Mark a session variable so new processes start without it

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Session.remove_environment`](/en/py/latest/reference/libtmux-session-remove_environment/) (method) |
| TypeScript | [`session.Session.removeEnvironment`](/en/ts/latest/reference/session-session-removeenvironment/) (method) |
| Rust | no equivalent on `Session` |
| Go | [`tmux.Session.RemoveEnvironment`](/en/go/latest/reference/tmux-session-removeenvironment/) (method) |
| Java | no equivalent on `Session` |
| C# | no equivalent on `Session` |
| C++ | no equivalent on `Session` |
| Swift | [`Server.removeEnvironment(_:in:)`](/en/swift/latest/reference/server-removeenvironment(_-in-)/) (method) |

No equivalent is recorded in Ruby, PowerShell, Julia, Elixir, Kotlin, Scala or F#.
