I know that this has been discussed here (How do I clear all user defined symbols?), but my case is somewhat different. How does one unload packages during runtime that were loaded with the start of Mathematica? Occasionally, for deployment reasons, I would like to revert my system to the default state, to check whether a function works in that environment as well. I have a package that starts when Mathematica starts, and it contains some modified system symbols too (e.g. extended usage messages for options). Should I include CleanSlate` in the same init.m file before loading my own package and then later refer to it when I want to return to the default Mathematica state? Would it revert modified System` context symbols too?
At the moment I manually have to edit the init.m to remove package loading and then the kernel must be restarted. This is quite tedious.
-noinit), and no other kernel is running than SafeMode ... it still loads my...\Kernel\init.m. – István Zachar Mar 08 '14 at 22:45MathKernel>WolframKernel,-mathlink>-wstp. I also figured out (just now) why myinit.mwas loaded, irregardless of the kernel arguments used: I've had myinit.mat$UserBaseDirectory\Autoload\Autoloadinstead of$UserBaseDirectory\Kernel. It's not clear what these directories are for exactly... – István Zachar Oct 15 '15 at 16:55