To uninstall miniconda do the following:
brew uninstall --force miniconda
Additionally, you might have done conda init "$(basename "${SHELL}")" for your respective terminal. To reverse that what I do is write the following: code .bashrc or code .zshrc in my terminal. This will open the respective file in VSCODE and you can delete the chunk of script that activates conda environments in the respective bash or zsh terminal.
Or you can just use the following:
For Bash
conda deactivate
conda config --remove-key "auto_activate_base"
conda init bash --reverse
For zsh
conda deactivate
conda config --remove-key "auto_activate_base"
conda init zsh --reverse
Basically, all it does is delete the (base) in your respective terminal by removing the activation script of conda. So, the reverse of the command conda init "$(basename "${SHELL}")".
Videos
In order to uninstall miniconda, simply remove the miniconda folder,
Copyrm -r ~/miniconda/
As for avoiding conflicts between different Python environments, you can use virtual environments. In particular, with Miniconda, the following workflow could be used,
Copy$ wget https://repo.continuum.io/miniconda/Miniconda3-3.7.0-Linux-x86_64.sh -O ~/miniconda.sh
$ bash miniconda
$ conda env remove --yes -n new_env # remove the environement new_env if it exists (optional)
$ conda create --yes -n new_env pip numpy pandas scipy matplotlib scikit-learn nltk ipython-notebook seaborn python=2
$ activate new_env
$ # pip install modules if needed, run python scripts, etc
# everything will be installed in the new_env
# located in ~/miniconda/envs/new_env
$ deactivate
The proper way to fully uninstall conda (Anaconda / Miniconda):
Remove all conda-related files and directories using the Anaconda-Clean package
Copyconda activate your_conda_env_name conda install anaconda-clean anaconda-clean # add `--yes` to avoid being prompted to delete each oneRemove your entire conda directory
Copy
rm -rf ~/miniconda3Remove the line which adds the conda path to the
PATHenvironment variableCopyvi ~/.bashrc # -> Search for conda and delete the lines containing it # -> If you're not sure if the line belongs to conda, comment it instead of deleting it just to be safe source ~/.bashrcRemove the backup folder created by the the Anaconda-Clean package NOTE: Think twice before doing this, because after that you won't be able to restore anything from your old conda installation!
Copy
rm -rf ~/.anaconda_backup
Reference: Official conda documentation