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
+11k Golang : Split strings into command line arguments
+4k Facebook : How to place save to Facebook button on your website
+7k Golang : Reverse a string with unicode
+14k Golang : Basic authentication with .htpasswd file
+9.4k Golang : Wait and sync.WaitGroup example
+9.6k Golang : Allow Cross-Origin Resource Sharing request
+16.8k Golang : Simple client server example
+9k PHP : Get coordinates latitude/longitude from string
+21.6k Golang : Read a file into an array or slice example
+5.5k Golang : Extract sub-strings
+6.9k Golang : Error reading timestamp with GORM or SQL driver
+13.6k Golang : How to filter a map's elements for faster lookup