Olhando para o uso, o comportamento que você está vendo parece com o que eu esperaria do subcomando use .
module use [-a |--append] directory [directory...]By default, this subcommand prepends the directory to the
$MODULEPATHenvironment variable. If the-aor--appendargument is used, then the directory will be appended to$MODULEPATH.
Com o subcomando unuse , ele removerá o (s) caminho (s) fornecido (s).
module unuse directory [directory...]Remove the directory from the $MODULEPATH environment variable.
Se você quiser substituir completamente uma variável, sempre poderá usar o comando setenv .
setenv variable valueSet environment variable to value. The
setenvcommand will also change the process' environment. A reference using Tcl's env associative array will reference changes made with thesetenvcommand. Changes made using Tcl's env associative array will NOT change the user's environment variable like the setenv command. An environment change made this way will only affect the module parsing process. Thesetenvcommand is also useful for changing the environment prior to theexecorsystemcommand. When a modulefile is unloaded,setenvbecomesunsetenv. If the environment variable had been defined it will be overwritten while loading the modulefile. A subsequent unload will unset the environment variable - the previous value cannot be restored! (Unless you handle it explicitly ... see below.)....