How to uninstall Bun on a Mac, including global packages and the PATH lines
Bun lives in one hidden folder, but its installer edits your shell profile and global installs hide in the same place. The three steps that remove it all.
How do I uninstall Bun on a Mac?
- Look in
~/.bun/binfirst. Anything you installed globally withbun add -glives there and goes with it. - Delete the folder:
rm -rf ~/.bun, or move~/.bunto the Trash in Finder (press⌘⇧.to show hidden folders). - Remove the PATH lines the installer added to
~/.zshrc: aBUN_INSTALLexport, a PATH line, and a line that loads Bun's completions. - Open a new Terminal window and check
which bunprints nothing.
What does Bun keep on a Mac?
| Where | Size here | What it is |
|---|---|---|
~/.bun/bin | 57 MB | The bun binary, bunx, and every global command |
~/.bun/install/global | 7.5 MB | Packages installed with bun add -g |
~/.zshrc | 5 lines | PATH, BUN_INSTALL and completions |
~/.bun/install/cache | 0 here | The package cache, which grows with every project |
On our Mac ~/.bun/bin held clawhub and clawdhub next to bun and bunx: two commands another tool had installed through Bun. Delete the folder and they stop working too, without any warning.
Bun was installed with Homebrew or npm
Then the binary is not in ~/.bun. Use brew uninstall bun or npm uninstall -g bun, and which -a bun to see every copy on your PATH. The ~/.bun folder can still exist from a global install and is safe to delete afterwards.
Find what is left in one look
Free Mac shows ~/.bun and its cache on the Storage map with every other hidden folder, and moves what you pick to the Trash. For the cache alone, see Bun's cache taking up space; for other global installs, global npm packages.
Related: uninstall Gemini CLI and uninstall Codex.
Common questions
Is it safe to delete the .bun folder on a Mac?
Yes, if Bun was installed with its own script. It holds the bun binary, its cache and global packages. Anything installed with bun add -g stops working, so check ~/.bun/bin first.
Why does Terminal still find bun after I deleted ~/.bun?
Another copy is on your PATH, usually from Homebrew or npm. Run which -a bun to see where each one lives and remove it the same way it was installed.
Does uninstalling Bun delete my projects' node_modules?
No. Each project's node_modules folder stays in the project. Delete those separately if you want the space back.