Quantcast
Channel: How to delete old $PATH echo in Mac - Super User
Viewing all articles
Browse latest Browse all 3

How to delete old $PATH echo in Mac

$
0
0

After i changed my Mac username(using the way supplied by Apple Documents), I found that when echo $PATH, there are some old paths in it.

/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/Cellar/tomcat/7.0.42/bin:/Users/WaterWood/eclipse/android-sdk-macosx/platform-tools/:/Users/majie/.rvm/bin

WaterWood is my old username and not exists anymore(I also deleted the folder "/User/WaterWood")

I checked all configuration file, such as .bashrc, .bash_profile, .zshrc, /etc/paths, /etc/paths.d/, but found nothing with "/User/WaterWood".

How to delete these from my $PATH? Thanks.

================

Update:

First I thought it was some bug of oh-my-zsh, and I reinstalled it. It works well, but when i re-login the problem appears again.

Change system shell to zsh(in system preference), run /usr/libexec/path_helper(the result is wrong)

PATH="/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/Cellar/tomcat/7.0.42/bin:/Users/WaterWood/eclipse/android-sdk-macosx/platform-tools/:/Users/majie/.rvm/bin"; export PATH;

Change system shell to bash, run path_helper(the result is correct)

PATH="/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin"; export PATH;

I delete all specific configuration in home folder(.zshrc, etc), but also has a "waterwood" in my terminal window, that drives me crazy.

enter image description here


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images