bashmacosterminalzsh

How to completely remove zsh (oh-my-zsh) from Mac M1 (MacOS Monterey)


I have tried to run:

uninstall_oh_my_zsh

but i get a message stating that: -bash: uninstall_oh_my_zsh: command not found

Other commands i have tried are:

chmod +x ~/.oh-my-zsh/tools/uninstall.sh

I get a response stating that: No such file or directory

sh ~/.oh-my-zsh/tools/uninstall.sh

Ran:

chsh -s /bin/bash

To change default terminal from /bin/zsh to /bin/bash

I also tried:

rm -rf ~/.oh-my-zsh
rm ~/.zshrc
cp ~/.zshrc.pre-oh-my-zsh ~/.zshrc
source ~/.zshrc

None of them have worked thus far, when i open my terminal. I get a message stating that: The default interactive shell is now zsh. To update your account to use zsh, please run chsh -s /bin/zsh


Solution

  • You don't have Oh My Zsh (a set of configuration files for zsh and a way to manage them) installed in the first place.

    The warning is coming from /bin/bash itself; it's hard-coded into the executable supplied by macOS.

    $ strings /bin/bash | grep "default interactive shell"
    The default interactive shell is now zsh.
    

    Though they don't say so, I suspect the warning is there because they plan to remove bash from future versions of macOS entirely. They stopped providing newer versions of bash years ago.

    Your default shell is already /bin/bash; the warning is recommending that you switch to /bin/zsh.

    You can continue to use bash, though I recommend installing a newer version (3.2 is old) using something like Homebrew, then changing your login shell to the new version.

    However, unless you are really committed to using bash, I suggest given zsh a try.