Some modules may break their evaluation on unload mode to ensure they cannot be unloaded by users.
$ cat /path/to/modulefiles/foo/1.0
#%Module
prereq bar
if {[module-info mode unload]} {
break
}
However when using module purge, the dependencies of these non-unloadable modules are unloaded, which makes the resulting environment inconsistent.
$ ml
Currently Loaded Modulefiles:
1) bar/1.0 2) foo/1.0
$ ml purge
Unloading foo/1.0
ERROR: Module evaluation aborted
$ ml
Currently Loaded Modulefiles:
1) foo/1.0