29

I'm on OSX and want to switch back to my original zsh config from oh-my-zsh, however when I run the uninstall script it gives me an error:

$ sudo uninstall oh-my-zsh

>> Preparing Uninstall...
   Uninstall Began...
   Uninstall Failed...
   Reason: ErrorMissingBundle

Can anyone please tell me what this means? Thanks!

beakr
  • 5,709
  • 11
  • 42
  • 66

9 Answers9

59

Have you tried just running the commands from uninstall script by hand? It's really straight forward: https://github.com/robbyrussell/oh-my-zsh/blob/master/tools/uninstall.sh. For the most part it just removes OMZ and attempts to restore a back up file:

rm -rf ~/.oh-my-zsh
rm ~/.zshrc
cp ~/.zshrc.pre-oh-my-zsh ~/.zshrc
source ~/.zshrc
Steve McKinney
  • 3,183
  • 1
  • 23
  • 26
  • Thanks for the help, I've already figured out how to do it by hand after a short while of figuring it out about a couple weeks or so ago. I never did it exactly in the given process, however my original zsh config works fine. – beakr Apr 07 '12 at 17:57
  • This works for me, but, if you want to reinstall zsh, you must copy manually the .zshrc file again – Álvaro Agüero Jan 11 '19 at 13:47
  • Be really careful with this! If you've modified your `.zshrc` a lot in the meantime since you installed ohmyzsh, simplying removing `~/.zshrc` without backing it up first will cause you to lose all of your config. – Life5ign Jan 28 '23 at 19:06
  • This code messed up my terminal for some reason and it did not work but "sh ~/.oh-my-zsh/tools/uninstall.sh" works fine – MertTheGreat Apr 01 '23 at 13:06
21

In new version, just run uninstall_oh_my_zsh from the command-line.

See https://github.com/robbyrussell/oh-my-zsh#uninstalling-oh-my-zsh

Robin Huy
  • 960
  • 7
  • 23
12

Try

/usr/bin/chsh -s /bin/bash
rm ~/.zshrc
brew uninstall zsh --force
Álvaro Agüero
  • 4,494
  • 1
  • 42
  • 39
4

just run uninstall_oh_my_zsh
from here https://github.com/robbyrussell/oh-my-zsh#uninstalling-oh-my-zsh

yaoning
  • 121
  • 4
1

Updating this for wsl2 as per today state, instead of ~/.zshrc.pre-oh-my-zsh it should be ~/.shell.pre-oh-my-zsh, complete list of commands that worked for me is:

rm -rf ~/.oh-my-zsh
rm ~/.zshrc
cp ~/.shell.pre-oh-my-zsh ~/.zshrc
source ~/.zshrc
Bella
  • 21
  • 4
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Mar 10 '23 at 03:56
1

Running uninstall_oh_my_zsh or manually sh ~/.oh-my-zsh/tools/uninstall.sh worked fine on mine.

MertTheGreat
  • 500
  • 1
  • 7
  • 20
0

I was unable to uninstall directly since I was getting zsh:command rm not found

so I did the following:

/usr/bin/chsh -s /bin/bash

on terminal preference, I switched back to the default Login shell and ran the below command

rm ~/.zshrc

brew uninstall zsh --force
Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
Judith lobo
  • 131
  • 4
0

Jest use this commands

1st pkg uninstall termux-ohmyzsh 2nd rm-rf termux-ohmyzsh

2nd is remove file from your storage and 1st is remove package from your storage. Then check your file type ls its remove.

King
  • 1
-1

simply use the following command:

/usr/bin/chsh -s /bin/bash
KayV
  • 12,987
  • 11
  • 98
  • 148
  • This just changes your default shell to be bash, 1) not uninstall OMZ, 2) doesn't restore Zsh, 3) makes it not even use Zsh anymore – Samathingamajig Jun 25 '21 at 16:34