Skip to content

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.

4 min read

How do I uninstall Oh My Zsh on a Mac?

  1. Copy your current ~/.zshrc somewhere safe. Anything you added since installing Oh My Zsh lives in it.
  2. Run the uninstaller in Terminal: uninstall_oh_my_zsh, and answer y.
  3. Open a new Terminal window. You get plain zsh with the .zshrc you had before Oh My Zsh.
  4. 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.

ItemSize hereWhat it is
~/.oh-my-zsh29 MBFramework, 3,400 files, 15 MB of it git history
~/.oh-my-zsh/custom4.1 MBYour own plugins and themes
~/.zshrc.pre-oh-my-zsh0 bytesThe backup the uninstaller restores
~/.p10k.zsh88 KBPowerlevel10k'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.

Read next