Unix/Linux/MacOSx : How to remove an environment variable ?
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
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
Tutorials
+9.2k Golang : Detect number of active displays and the display's resolution
+6.3k Golang : Warp text string by number of characters or runes example
+11.8k Golang : calculate elapsed run time
+5.5k CodeIgniter/PHP : Remove empty lines above RSS or ATOM xml tag
+76.9k Golang : How to return HTTP status code?
+5.3k Golang : Configure crontab to poll every two minutes 8am to 6pm Monday to Friday
+3.2k Java : Get FX sentiment from website example
+16.7k Golang : Covert map/slice/array to JSON or XML format
+19.4k Golang : Append content to a file
+6.2k Golang : How to validate ISBN?
+48k Golang : Upload file from web browser to server
+7.3k Golang : Error reading timestamp with GORM or SQL driver