Unix/Linux/MacOSx : How to remove an environment variable ?


Tags : unix linux macosx unset environment-variables

Somehow I screwed up my GOPATH and GOROOT environment variables today and removing (sudo yum remove ) Go did not help. A quick check revealed the old environment variables are still around.

Problem :

How to remove the unwanted environment variables ?

Solution :

Use unset command. unset <environment variable>

For example :

unset GOROOT



Tags : unix linux macosx unset environment-variables

By Adam Ng

IF you gain some knowledge or the information here solved your programming problem. Please consider donating to the less fortunate or some charities that you like. Apart from donation, planting trees, volunteering or reducing your carbon footprint will be great too.


Advertisement