eshell-unload-all-modules

eshell-unload-all-modules is a compiled Lisp function in `eshell.el'.

(eshell-unload-all-modules)

Unload all modules that were loaded by Eshell, if possible.
If the user has require'd in any of the modules, or customized a
variable with a :require tag (such as `eshell-prefer-to-shell'), it
will be impossible to unload Eshell completely without restarting
Emacs.