There's a new MacOS update and that means once I upgrade all my terminal commands like npm and brew are going to break (ie "zsh: command not found: brew"). What's the optimal way of dealing with this going forward into 2023? Do addons like oh-my-zsh and powerlevel10k affect it?

1 Answer 1


"Command not found" implies that the path to brew binaries got lost. A way to keep the paths is to add a file to /etc/paths.d:

cat <<EOF
$(brew --prefix)/bin
$(brew --prefix)/sbin
EOF > /tmp/homebrew
sudo mv /tmp/homebrew /etc/paths.d/

You can do the same for other paths.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .