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
+12.8k Golang : Check if a file exist or not
+6.3k Golang : File system scanning
+5.1k PageSpeed : Clear or flush cache on web server
+8.1k Golang : Temperatures conversion example
+6k Golang : Mapping Iban to Dunging alphabets
+12.5k Golang : Human readable time elapsed format such as 5 days ago
+14.6k Golang : Update database with GORM example
+10.5k Golang : Change date format to yyyy-mm-dd
+14.3k Golang : How to convert(cast) IP address to string?
+6.1k Golang : Validate credit card example
+16.3k Golang : Login and logout a user after password verification and redirect example
+5k Golang : How to write backslash in string?