How do I restore my TeX path?

Depending on how the installation is performed, it may happen that the new system doesn't keep the necessary file in /etc/paths.d

The solution is simple: restore the file in the correct position. From a Terminal window, issue the following two commands

echo /usr/texbin > TeX
sudo mv TeX /etc/paths.d

(you will be asked to type your password; this must be done by a user with administrative privileges).

A logoff-login cycle should solve the issue.

Update

With Mac OS X 11 (El Capitan) and TeX Live 2015 (or later), the first instruction should become

echo /Library/TeX/texbin > TeX

Just thought i'd add my two cents. egreg's solution is great but usage of paths.d and the path_helper is kind of discouraged in Mac OS X, at least when using ZSH and so that answer could not be working if paths.d is disabled.

I added /usr/texbin to my path and everything was happy.

To do that, I opened my .zshrc and appended :/usr/texbin to the line that defines my path. The line starts with: export PATH=.


Simple: Open TeXShop, select preferences under menu options, under that select Engine option, In that option change the tab Path settings to your texbin path, in my case it was /usr/texbin which I had to change to /Library/TeX/texbin.

That's it. No need to add any other paths any where else. It's already so user-friendly.