NAME
flox-deactivate - deactivate an environmentSYNOPSIS
DESCRIPTION
Deactivates an active Flox environment in the current shell, reversing the changes made byflox-activate.
flox deactivate deactivates the innermost (most recently activated)
environment. When multiple environments are layered, running
flox deactivate repeatedly deactivates them one at a time, innermost
first.
Deactivation performs the following steps:
- Runs the
profile.deactivate.${shell}script from the environment’s manifest, if defined, allowing the environment to undo modifications it made during activation. - Restores environment variables and shell state to their pre-activation values. Only variables that activation set are reverted; variables that activation did not touch are left alone.
- Reverts shell customizations: the prompt is restored from its saved
value (or recomputed from the remaining active environments if any
remain), command hashing is re-enabled, and any zsh
FPATHentries, completion caches, and precmd hooks installed by activation are removed. - Detaches the current shell from the activation. When the last shell detaches, services started by the activation are stopped.
Interactive subshells
Inside a subshell created by an interactiveflox activate,
flox deactivate is equivalent to exit: it exits the subshell and
returns to the parent shell, where any previously active environments
are restored automatically.
OPTIONS
General Options
-h, --helpPrints help information. The following options can be passed when running any
flox subcommand
but must be specified before the subcommand.
-v, --verboseIncrease logging verbosity. Invoke multiple times for increasing detail.
-q, --quietSilence logs except for errors.
EXAMPLES
Deactivate the innermost active environment:flox activate subshell (equivalent to running exit):
SEE ALSO
flox-activate