How to Completely Uninstall Homebrew from macOS in 2025/2026 (No Leftover Files)
Homebrew is a fantastic package manager for macOS, but sometimes you need to wipe it clean: maybe you’re switching to another tool like MacPorts, troubleshooting conflicts, or just decluttering your system. The good news? Homebrew’s official uninstall script handles 95% of the cleanup automatically, including all installed packages, caches, and core files. No more stray symlinks or hidden folders eating up your SSD.
This guide is beginner-friendly, step-by-step, and verified for 2025 (macOS Tahoe 26, Sequoia 15, and Ventura 13+). It ensures nearly zero leftovers by combining the official script with a quick manual check. Takes 5–10 minutes total.
Warning: This removes everything Homebrew-related, including packages like Git, Node.js, or Python you installed via it. Back up first!

Why Uninstall Homebrew Completely in 2025?
- Space Savings: Can free up 5–50 GB (depending on your installs).
- Troubleshooting: Fixes PATH conflicts or broken dependencies in Tahoe 26.
- Clean Slate: Ideal before a fresh macOS install or switching to native Apple tools.
- No Changes in 2025: Homebrew’s uninstall process hasn’t evolved since 2024 – still the same reliable script from their GitHub repo.
Step 1: Backup Important Data (Mandatory – 2 Minutes)
Before nuking anything:
- List Installed Packages: Open Terminal (Cmd + Space > “Terminal”) and run:text
brew list- This shows everything (e.g., git, wget). Note any you want to reinstall later.
- Export Formulas (Optional): If you have custom setups:text
brew bundle dump --file=~/Desktop/my-brews.rb- This creates a file to recreate your setup later.
- Time Machine Backup: Go to System Settings > General > Time Machine > Back Up Now. (Or use Carbon Copy Cloner for externals.)
Beginner Note: If you’re on an M-series Mac (Apple Silicon), Homebrew lives in /opt/homebrew. On Intel, it’s /usr/local. The script detects this automatically.
Step 2: Run the Official Homebrew Uninstall Script (3 Minutes)
Homebrew’s built-in script is the gold standard – it removes the core install, all Cellar packages, Cask apps (like browsers), caches, logs, and symlinks.
- Open Terminal.
- Download and run the script:text
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"- What Happens: It downloads uninstall.sh, prompts for confirmation (“Are you sure? [y/N]”), asks for your password, and shreds everything.
- Expected Output:text
Warning: This script will remove: ~/Library/Caches/Homebrew/ ~/Library/Logs/Homebrew/ /opt/homebrew/Caskroom/ (or /usr/local/Caskroom/ on Intel) /opt/homebrew/Cellar/ /opt/homebrew/bin/brew ... [full list of 20+ items] Are you sure you want to uninstall Homebrew? This will remove your installed packages! [y/N]: y ==> Removing Homebrew installation... ==> Removing empty directories... ==> Homebrew uninstalled!
- Enter y when prompted, then your Mac password (it won’t show as you type). Hit Enter.
Pro Tip: If you’re on Apple Silicon and want to specify the path (rarely needed):
text
/bin/bash uninstall.sh --path=/opt/homebrew Run /bin/bash uninstall.sh –help for more options.
What It Removes (No Stone Unturned):
| Category | Files/Folders Removed | Why It Matters |
|---|---|---|
| Core Homebrew | /opt/homebrew/ (or /usr/local/) | Main install dir |
| Packages | /opt/homebrew/Cellar/ & all installed brews | Frees GBs of space |
| Casks (Apps) | /opt/homebrew/Caskroom/ | Removes GUI apps like VS Code |
| Caches & Logs | ~/Library/Caches/Homebrew/ & ~/Library/Logs/ | Clears temp junk |
| Symlinks | /opt/homebrew/bin/* (e.g., brew command) | Cleans PATH |
Step 3: Manual Cleanup for 100% No Leftovers (2 Minutes)
The script is thorough, but 2025 macOS (Tahoe 26) can leave tiny traces like shell configs or RVM hooks. Check these:
- Remove Shell Profile Edits: Homebrew adds lines to ~/.zshrc, ~/.bash_profile, or ~/.profile. Edit with:text
nano ~/.zshrc- Delete lines like:text
export PATH="/opt/homebrew/bin:$PATH" eval "$(/opt/homebrew/bin/brew shellenv)" - Save (Ctrl+O > Enter > Ctrl+X). Repeat for other files.
- Delete lines like:text
- Delete Hidden Folders:text
rm -rf ~/.homebrew # Rare, but possible rm -f ~/.rvm/bin/brew # If using RVM - Stop Any Brew Services: If you had daemons (e.g., MySQL):text
brew services stop all # If still accessible, or skip if uninstalled launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.*.plist # Manual kill rm -f ~/Library/LaunchAgents/homebrew.mxcl.*.plist - Verify Removal: Run:text
which brew- Should output: brew not found.
ls /opt/homebrew # or /usr/local- Should say: ls: cannot access ‘/opt/homebrew’: No such file or directory.
Beginner Tip: Use find ~ -name “*homebrew*” -type d 2>/dev/null to hunt for strays. Delete with rm -rf (carefully!).
Step 4: Reinstall If You Change Your Mind (Optional)
- Just run the install script:text
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - To restore packages: brew bundle install –file=~/Desktop/my-brews.rb.
Common Issues & Fixes (Tahoe 26 Specific)
| Issue | Fix |
|---|---|
| “Permission denied” on script | Run sudo chown -R $(whoami) /opt/homebrew first. |
| Script hangs on Tahoe 26 | Update Xcode Command Line Tools: xcode-select –install. (Rare bug from Sept 2025, fixed in Homebrew 4.6.11+). |
| Leftovers in /usr/local/bin | Manual: sudo rm -f /usr/local/bin/brew*. |
| Zsh PATH still broken | source ~/.zshrc after edits, or restart Terminal. |
Final Thoughts
You’ve now got a pristine macOS – no Homebrew ghosts haunting your Terminal. This process works flawlessly on macOS Tahoe 26.0.1 (confirmed via official docs and GitHub as of Nov 27, 2025). If you’re ditching Homebrew for good, consider native alternatives like macports or Apple’s own mas for App Store apps.
Questions? Drop a comment with your Mac model – I’ll help troubleshoot. Bookmark for future wipes!