Unload module(s). "remove" is an alias of "unload". In some cases, module dependencies might be broken by this command. If you met the situation, please "purge" or log in again.
Example 1: unload cuda/12.2u2
$ module list
Currently Loaded Modulefiles:
1) cuda/12.2u2 2) 2024
Key:
auto-loaded default-version
$ nvcc --version |& grep release
Cuda compilation tools, release 12.2, V12.2.140
$ module unload cuda/12.2u2
$ nvcc --version
bash: nvcc: command not found...
Example 2: unload cuda/12.2u2 without version name
$ module list
Currently Loaded Modulefiles:
1) cuda/12.2u2 2) 2024
Key:
auto-loaded default-version
$ nvcc --version |& grep release
Cuda compilation tools, release 12.2, V12.2.140
$ module unload cuda
$ nvcc --version
bash: nvcc: command not found...