Sample Header Ad - 728x90

How to unset a variable which is previously set somewhere in Mac OS I don't know?

0 votes
1 answer
2619 views
I have a variable set exactly like this: export VARIABLE_NAME=VARIABLE_VALUE I thought it would be in ~/.zshrc or bash_profile but it is seen in none of those. I am now struggling to understand where its getting set and I want to reset it up. Can someone suggest easy way to do so? I am on MacOS I am using zsh shell. I know the command called unset VARIABLE_NAME. However I am looking into finding root cause and removing the variable from the first place where its been set. Variable name is JWT_SECRET **Update:** I tried running grep JWT_SECRET {~/.z,/etc/z}{shenv,profile,shrc,login} as [proposed by @nohillside](https://apple.stackexchange.com/a/460904) I have configured my zsh to use ohmyzsh. Here's how output looks like: enter image description here When I do: echo $SHELL $ZSH_VERSION $BASH_VERSION I get: /bin/zsh 5.9 Here's what I have in my ~/.zshrc:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
DISABLE_AUTO_TITLE="true"
PS1="%1d %& # "
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="robbyrussell"
ENABLE_CORRECTION="true"
plugins=(git)
source $ZSH/oh-my-zsh.sh
export SU_PASSWORD=
export SU_USERNAME=
export PATH="/Users//bin:$PATH"
Asked by Shivam Sahil (113 rep)
Jun 10, 2023, 04:31 AM
Last activity: Jun 11, 2023, 11:04 AM