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
+29k Golang : JQuery AJAX post data to server and send data back to client example
+51.6k Golang : How to get time in milliseconds?
+12.8k Golang : Handle or parse date string with Z suffix(RFC3339) example
+17.2k Golang : Find smallest number in array
+33.5k Golang : convert(cast) bytes to string
+14.8k JavaScript/JQuery : Detect or intercept enter key pressed example
+40.7k Golang : How to count duplicate items in slice/array?
+21.7k Fix "Failed to start php5-fpm.service: Unit php5-fpm.service is masked."
+12.4k Golang : zlib compress file example
+22.3k Generate checksum for a file in Go
+9.8k Golang : Channels and buffered channels examples
+21.8k Golang : Match strings by wildcard patterns with filepath.Match() function