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
+13.9k Golang : How to check if a file is hidden?
+7.8k Golang : How to feed or take banana with Gorilla Web Toolkit Session package
+19.9k Golang : How to run your code only once with sync.Once object
+8.4k Golang : Generate Datamatrix barcode
+12.9k Golang : Get terminal width and height example
+19.1k Golang : Execute shell command
+6.1k Golang : How to write backslash in string?
+8.2k Golang : Oanda bot with Telegram and RSI example
+7.9k Golang : Grayscale Image
+7.6k Golang : get the current working directory of a running program
+10.2k Golang : Detect number of faces or vehicles in a photo
+7k Restart Apache or Nginx web server without password prompt