Thanks to @ilkkachu I found a solution to this. I have posted it here and you can find it in the comments as well.
I want to unset one environment variable and I have searched all these places:
~/.bashrc
~/.profile
/etc/profile
/etc/environment
~/.bash_profile
/etc/bash.bashrc
/etc/profile.d/
As you can see, I have done my homework, but not only I can't find this specific environment variable, I am not able to find the majority of environment variables that env command shows either.
btw, I am using Debian 10.
PS:as this question has been asked numerous times on different forums, I guide anyone that has this question to use the function provided by @terdon in one of the answers. Unfortunately that doesn't solve my problem. But it definitely works in ordinary situations.
bash -xl
. This will run a new login shell and print all variables and functions that are set. – Henri Menke Sep 27 '21 at 15:49