Skip to content

zi unload

Unload a plugin that was loaded with zi load, reverting all of its recorded side effects. Only works for plugins loaded with the full load command (not light).

Terminal window
zi unload [-q] {plg-spec}
  • -q — quiet, suppress output.

Zinit replays the inverse of every change the plugin registered at load time: removes aliases, functions, bindkeys, Zle widgets, zstyles, completions, and PATH/FPATH entries the plugin added. Variables are restored to their pre-load values unless they were whitelisted with zi env-whitelist. The plugin’s directory on disk is not deleted; only its in-memory effects are undone. After unloading, the plugin can be re-loaded by running zi load again.

Terminal window
# Unload a plugin
zi unload zdharma-continuum/history-search-multi-word
# Unload quietly
zi unload -q zsh-users/zsh-autosuggestions

unload has no effect on plugins loaded with zi light — no investigation data was collected for those. If some variables should persist across unloads, register them with zi env-whitelist first.

  • cmd-load
  • cmd-report
  • cmd-env-whitelist