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
+28.9k Golang : Generate random string
+7k Golang : Multiplexer with net/http and map
+3.8k Linux/MacOSX : How to symlink a file?
+17.3k Golang : Get path name to current directory or folder
+8.7k Golang : Check if user agent is a robot or crawler example
+22k Find and replace a character in a string in Go
+12.9k Golang : Google Drive API upload and rename example
+6.8k Golang : Error reading timestamp with GORM or SQL driver
+16.4k Golang : Read data from config file and assign to variables
+10.7k Golang : Decompress zlib file example
+31.2k Golang : Regular Expression for alphanumeric and underscore