Fixed my broken $PATH on macOS

My $PATH got messy after installing Brew, Nix, and some other stuff. Some commands like npm and flutter stopped working even though they were installed.


I found this script:


https://github.com/italoalmeida0/macos-fix-path-pro

I fixed using only with this code:


/usr/bin/curl -fsSL https://raw.githubusercontent.com/italoalmeida0/macos-fix-path-pro/main/macos-fix-path-pro.zsh | /bin/zsh


It scans a bunch of common install paths (Brew, Nix, SDKs), builds a clean PATH, and updates your .zshrc. It also backs it up so you can revert. Helped me avoid digging through shell config manually.


Mac mini

Posted on Apr 16, 2025 11:03 PM

Reply
1 reply
Sort By: 

Apr 17, 2025 4:19 PM in response to aloipex

aloipex wrote:

My $PATH got messy after installing Brew, Nix, and some other stuff. Some commands like npm and flutter stopped working even though they were installed.

I found this script:

https://github.com/italoalmeida0/macos-fix-path-pro
I fixed using only with this code:

/usr/bin/curl -fsSL https://raw.githubusercontent.com/italoalmeida0/macos-fix-path-pro/main/macos-fix-path-pro.zsh | /bin/zsh

It scans a bunch of common install paths (Brew, Nix, SDKs), builds a clean PATH, and updates your .zshrc. It also backs it up so you can revert. Helped me avoid digging through shell config manually.


Good computing aloipex —thanks for your post



Reply

Fixed my broken $PATH on macOS

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.