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
+7k Findstr command the Grep equivalent for Windows
+4.9k Golang : Struct field tags and what is their purpose?
+6.9k Swift : Convert (cast) String to Double
+18.1k Mac OSX : Homebrew and Golang
+13.8k Golang : Get HTTP protocol version example
+7.8k Golang : Get final balance from bit coin address example
+7.1k Golang : Append and add item in slice
+26.1k Golang : Convert integer to binary, octal, hexadecimal and back to integer
+6.4k Golang : How to stop user from directly running an executable file?
+11.8k Golang : http.Get example
+4.7k Golang : Grab news article text and use NLP to get each paragraph's sentences
+21.2k Generate checksum for a file in Go