You Asked: How Do You Delete an Environment Variable in Linux?
Contents Sometimes You Want to Completely Remove the Variable from the Environment. in Order to Remove or Unset a Variable from the Environment, You Can Again...
Contents
Sometimes you want to completely remove the variable from the environment. In order to remove or unset a variable from the environment, you can again use the env command with the –unset (-u) command line option. Another command which does the same thing is the unset command.
How do I remove an environment variable in Linux?
To Clear these session-wide environment variables following commands can be used:
- Using env. By default, “env” command lists all the current environment variables. …
- Using unset. Another way to clear local environment variable is by using unset command. …
- Set the variable name to ”
Must Read
How do you remove an environment variable?
ON WINDOWS
- Right-click on My Computer and select Properties.
- Go to the Advanced system settings tab.
- Click the Environment Variables button. The Environment Variables dialog opens.
- Select the environment variable you want to delete and click Delete.
- Repeat step 4 as many times as necessary.
- Click OK.