How to uninstall Oh My Zsh on a Mac and get your old .zshrc back
Oh My Zsh has its own uninstall command, and it restores the .zshrc you had before. When that backup is empty, what to do, plus Powerlevel10k's leftovers.
How do I uninstall Oh My Zsh on a Mac?
- Copy your current
~/.zshrcsomewhere safe. Anything you added since installing Oh My Zsh lives in it. - Run the uninstaller in Terminal:
uninstall_oh_my_zsh, and answer y. - Open a new Terminal window. You get plain zsh with the
.zshrcyou had before Oh My Zsh. - Paste back the lines you still need: PATH changes, nvm, aliases.
What does the uninstaller do?
It deletes ~/.oh-my-zsh, moves your current .zshrc aside, and renames ~/.zshrc.pre-oh-my-zsh, the backup made at install time, back to ~/.zshrc. On our Mac that backup was 0 bytes: there was no .zshrc before Oh My Zsh. Restoring it gives an empty profile, so every PATH line added since, for nvm, Bun or Rust, is gone until you copy it back.
| Item | Size here | What it is |
|---|---|---|
~/.oh-my-zsh | 29 MB | Framework, 3,400 files, 15 MB of it git history |
~/.oh-my-zsh/custom | 4.1 MB | Your own plugins and themes |
~/.zshrc.pre-oh-my-zsh | 0 bytes | The backup the uninstaller restores |
~/.p10k.zsh | 88 KB | Powerlevel10k's settings, if you used that theme |
What about Powerlevel10k?
Its settings file ~/.p10k.zsh and the lines in .zshrc that load it stay after Oh My Zsh goes. Delete the file, and if you installed the theme with Homebrew, brew uninstall powerlevel10k.
Find what is left in one look
Free Mac shows every hidden folder in your home folder by size, ~/.oh-my-zsh included, and moves what you pick to the Trash. More on these folders in dot folders taking up space and terminal apps.
Related: uninstall Alfred and uninstall Ghostty.
Common questions
What command uninstalls Oh My Zsh?
uninstall_oh_my_zsh, typed in Terminal. It removes ~/.oh-my-zsh and restores the .zshrc you had before installing it.
Will uninstalling Oh My Zsh delete my aliases?
Yes, if they are in your current .zshrc. The uninstaller swaps that file for the pre Oh My Zsh backup. Copy the lines you want first.
Is it safe to delete the .oh-my-zsh folder by hand?
Yes, but your .zshrc still tries to load it and prints an error in every new window. Use the uninstaller, or remove the Oh My Zsh lines from .zshrc yourself.