Thanks
]]>The problem I had is that I didn’t find where it was allocated, and didn’t find it in any of the files listed above. Finally, I encountered it in /etc/alternatives (I don’t understand why it was there).
Anyway, a useful tool to find an environment variable (e.g. var_name) is to open the terminal and type:
# grep -R var_name /etc/ (if you think it is in /etc/) or # grep -R var_name /home/ (if you think it is in /home/)]]>
This is wrong! Using export makes the variable an environment variable. Just setting it to empty does not clear the env var it still exists with an empty value and any checks for its existence would return true.
You need to use unset to remove the variable in this case.
$ export VAR1=1 $ env | grep VAR1 VAR1=1 $ VAR1='' $ env | grep VAR1 VAR1= $ unset VAR1 $ env | grep VAR1]]>