Saying Bye to Oh My Zsh!: Removing Your Customized Shell

Siddu HussainSiddu Hussain
2 min read

Have you ever felt like your fancy terminal setup with Oh My Zsh! is too much? Maybe you want something more straightforward. Whatever your reason, let's make removing Oh My Zsh! easy.

Saying Bye to Oh My Zsh!

First, we need to delete the Oh My Zsh folder. If you installed it in the usual place (~/.oh-my-zsh), type this in your terminal:

# Removes the ~/.oh-my-zsh directory and all its contents.

# This command is used to delete the Oh My Zsh configuration directory 
# and all its associated files and folders.
# Be cautious when using this command as 
# it permanently deletes the directory and its contents.

rm -rf ~/.oh-my-zsh

That's it! Oh My Zsh! is gone.

Getting Your Old Shell Back

Now, let's go back to your old shell settings. Find your shell configuration file (usually ~/.zshrc). If you have a backup, great! Put it back. If not, make a new one:

#This code snippet removes the existing .zshrc file 
#creates a new empty .zshrc file.
#The .zshrc file is a configuration file for the Zsh shell. 
#By removing and creating a new .zshrc file,
#any previous configurations will be discarded 
#fresh configuration file will be created.

rm ~/.zshrc
touch ~/.zshrc

Your shell is back to how it was.

Going Back to Your Old Shell

If you switched to Zsh with Oh My Zsh!, let's switch back. Find out your current shell:

# This code snippet prints the value of the $SHELL environment variable.
echo $SHELL

Then, find out how to switch back to your old shell. It's usually easy.

#Switch to bash
exec bash 

#Switch to zsh
exec zsh

Restarting Your System

Lastly, restart your terminal or shell. Everything will be back to normal.

That's it! Oh My Zsh! is gone, and your terminal is simple again. Whether you want a fresh start or just less stuff, removing Oh My Zsh! is easy.


Happy Coding! Namaste ๐Ÿ™

One breath at a time


0
Subscribe to my newsletter

Read articles from Siddu Hussain directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Siddu Hussain
Siddu Hussain