Because the original question doesn't mention how the variable was set, and because I got to this page looking for this specific answer, I'm adding the following:
In C shell (csh/tcsh) there are two ways to set an environment variable:
set x = "something"
setenv x "something"
The difference in the behaviour is that variables set with setenv command are automatically exported to subshell while variable set with set aren't.
To unset a variable set with set, use
unset x
To unset a variable set with setenv, use
unsetenv x
Note: in all the above, I assume that the variable name is 'x'.
credits:
https://www.cyberciti.biz/faq/unix-linux-difference-between-set-and-setenv-c-shell-variable/ https://www.oreilly.com/library/view/solaristm-7-reference/0130200484/0130200484_ch18lev1sec24.html