How to remove entry from $PATH on mac

Tushar Koul picture Tushar Koul · Apr 8, 2013 · Viewed 102.5k times · Source

I was trying to install Sencha Touch SDK tools 2.0.0 but could not run it properly. It created an entry in the $PATH variable. Later I deleted the sencha sdk tools folder but didn't realize that the path variable is still there.

When i did echo $PATH I got -

/Applications/SenchaSDKTools-2.0.0-beta3:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin

I searched on how to remove variables from $PATH and followed these steps :

  1. Gave the command PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin"
  2. Did echo $PATH which showed /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
  3. gave the command export PATH
  4. Closed terminal and reopened it. Gave the command echo $PATH. This time I got /Applications/SenchaSDKTools-2.0.0-beta3:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin

Can anyone tell me what am i doing wrong?

Answer

user3890550 picture user3890550 · Jul 30, 2014
  1. echo $PATH and copy it's value
  2. export PATH=""
  3. export PATH="/path/you/want/to/keep"