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
+40.9k Golang : Convert to io.ReadSeeker type
+23.8k Golang : Read a file into an array or slice example
+33.2k Delete a directory in Go
+17.1k Golang : Read integer from file into array
+6.1k Linux/MacOSX : Search for files by filename and extension with find command
+20.7k Golang : Pipe output from one os.Exec(shell command) to another command
+14k Golang : Check if an integer is negative or positive
+8.3k Golang : How To Use Panic and Recover
+6.3k Golang : Grab news article text and use NLP to get each paragraph's sentences
+8.2k Golang : Trim everything onward after a word
+25.6k Golang : Convert long hexadecimal with strconv.ParseUint example