unsetenv
unsetenv is a function provided by the C standard library on POSIX-compliant systems that removes an environment variable from the calling process’s environment. By modifying the process-wide environment, it affects the set of variables visible to code running in the same process and to subsequently executed programs.
The typical prototype is int unsetenv(const char *name); and it is usually declared in a standard header
Return value and error handling: On success, unsetenv returns 0. If an error occurs, it returns -1
Relationship to setenv: unsetenv is the counterpart to setenv. While setenv creates or updates an environment
Shell usage: In many Unix shells, unsetenv is not a built-in; shells such as bash and sh