Back to Bash - Remove Zsh and terminal themes on a Mac step-by-step
How to remove Zsh along with its themes and configuration tools and change your shell back to Bash.
This tutorial will show you how to change your shell back to Bash and remove the highly customisable Z shell along with its themes, such as Powerlevel9k, or configuration tools, for example Oh My Zsh.
The Z shell with its themes and frameworks is very popular. This article is written for those who might want to carry out a clean reinstall of Zsh, need to revert their shell to the default settings, or want to use Bash instead.
This assumes you are using a Mac and have its package manager Homebrew installed since many commands here are for uninstalling code added with brew install.
- Why remove Zsh?
- Remove Oh My Zsh
- Remove the Powerlevel9k theme
- Remove Nerd Fonts
- Revert to Bash and remove Zsh shell
- Find out more
Why remove Zsh?
This article further expands on the instructions I wrote to remove Zsh started in response to Make your terminal more colourful and productive with iTerm2, Zsh and Powerlevel9K!
This tutorial is not recommending abandoning using Zsh if you enjoy using it, but could be useful for situations such as:
- You want to try a new configuration and need to remove the old setup
- Something went wrong with installing/configuring a Zsh theme and you need a fresh start
- You tried Zsh and a theme but have changed your mind
- You would prefer to use the Bash shell
Oh My Zsh is an open source, community-driven framework for managing your zsh configuration.
Remove Oh My Zsh
It will remove Oh My Zsh and revert your previous bash or zsh configuration.
Remove the Powerlevel9k theme
There are many themes for Zsh, one popular one is Powerlevel9k.
If you installed Powerlevel9k using without any frameworks or package managers, this is normally done through →
git clone https://github.com/bhilburn/powerlevel9k.git ~/powerlevel9k
You can remove it by running the following from the command line.
rm -rf ~/powerlevel9k
To set up Powerlevel9k, you needed to add some configuration to your
~/.zshrc file - so open that up and delete all these lines, such as…
Remove Nerd Fonts
Nerd Fonts are one of the fonts that include extra programming icons that you can to enhance your terminal theme and prompt. It is a popular choice when using Powerlevel9k. There are a few steps to remove it.
Assuming you installed Nerd Fonts with homebrew…
brew cask uninstall font-hack-nerd-font
You may then need to set a new font if you are using iTerm2.
iTerm2 -> Preferences -> Profiles -> Text -> Font -> Change Font
Lastly, remove the reference to it in your
Revert to Bash and remove Zsh shell
First enter the command to change back to using the Bash shell.
/usr/bin/chsh -s /bin/bash
Then remove the Zsh configuration file.
And uninstall Zsh.
brew uninstall zsh --force
Now you should be back to using the Bash shell when you use your terminal.
Find out more
Learning how to manage your shell configuration can help you master your command line workflow effectively as well as improving your knowledge of your Mac’s operating system.