Patrik Szilágyi
Patrik Szilágyi

Reputation: 141

Uninstall Miniconda on MacOS

I would like to uninstall Miniconda from my mac. I wanted to follow these instructions but I didn't find similar folders or files in my home directory. However I found the miniconda3 folder in /opt/. I'm not sure that it is a good idea to delete folders outside the home directory. So my questions are:

Upvotes: 14

Views: 12896

Answers (1)

Nancy Chen
Nancy Chen

Reputation: 121

Can I remove the miniconda3 library?

Yes, you can remove the library.

Why miniconda3 is in /opt/ instead of ~/miniconda3/?

I don't know why, but the miniconda3 is in the /opt/miniconda3.

You may uninstall miniconda3 with the following commands:

  1. cd /; rm -rf ~/.condarc ~/.conda ~/.continuum
  2. cd opt
  3. sudo rm -rf miniconda3
  4. Open your bash or zsh rc file to remove miniconda from your path variable.

I used zsh, so I open -e ~/.zshrc to delete the context:

# >>> conda init >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$(CONDA_REPORT_ERRORS=false '/Users/yilin/opt/anaconda3/bin/conda' shell.bash hook 2> /dev/null)"
if [ $? -eq 0 ]; then
    \eval "$__conda_setup"
else
    if [ -f "/Users/yilin/opt/anaconda3/etc/profile.d/conda.sh" ]; then
        . "/Users/yilin/opt/anaconda3/etc/profile.d/conda.sh"
        CONDA_CHANGEPS1=false conda activate base
    else
        \export PATH="/Users/yilin/opt/anaconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda init <<<

Upvotes: 12

Related Questions