alvas
alvas

Reputation: 122260

How to uninstall mini conda? python

I've install the conda package as such:

$ wget http://bit.ly/miniconda
$ bash miniconda
$ conda install numpy pandas scipy matplotlib scikit-learn nltk ipython-notebook seaborn

I want to uninstall it because it's messing up my pips and environment.

Upvotes: 138

Views: 422714

Answers (7)

m3ph
m3ph

Reputation: 53

Adding to the list of possible installations: uninstalling standalone Mamba (or micromamba) from Windows is quite straightforward. Open the software installation catalogue "Apps & Features" and look for python. It should look like this.

uninstalling mamba from windows

After hitting uninstall you are guided through the process by the uninstaller.

Upvotes: 0

Hitesh Sahu
Hitesh Sahu

Reputation: 45140

Update Sept 2023: Uninstalling Anaconda Distribution from MacOS

According to Official documentation you need to install anaconda-clean

conda install anaconda-clean

1. Run anaconda-clean

After installation run anaconda-clean to remove all Anaconda-related files and directories. It will ask for confirmation before deleting each file

# If you want to confirm each file and directory you are deleting
anaconda-clean

Or you can delete all files without confirmation with --yes argument

# If you don't want to be asked about each file and directory
anaconda-clean --yes

The anaconda-clean command also creates a backup of files in the home directory in a folder named .anaconda_backup

2. Delete all Conda related folder

The following are a few examples of how you may need to delete your Anaconda folder

rm -rf anaconda3
rm -rf ~/anaconda3
rm -rf ~/opt/anaconda3

3. Remove conda from PATH variables

if you have conda path set in ~/.profile, ~/.bash_profile or ~/.bash_login, remove it from there as well.

nano ~/.bashrc
nano ~/.profile
nano  ~/.zshrc

I hope that helps.

Upvotes: 4

rth
rth

Reputation: 11199

In order to uninstall miniconda, simply remove the miniconda folder,

rm -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,

$ 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

Upvotes: 147

divenex
divenex

Reputation: 17256

To update @Sunil answer: Under Windows, Miniconda has a regular uninstaller. Go to the menu "Settings/Apps/Apps&Features", or click the Start button, type "uninstall", then click on "Add or Remove Programs" and finally on the Miniconda uninstaller.

Upvotes: 3

tsveti_iko
tsveti_iko

Reputation: 8042

The proper way to fully uninstall conda (Anaconda / Miniconda):

  1. Remove all conda-related files and directories using the Anaconda-Clean package

    conda activate your_conda_env_name
    conda install anaconda-clean
    anaconda-clean # add `--yes` to avoid being prompted to delete each one
    
  2. Remove your entire conda directory

    rm -rf ~/miniconda3
    
  3. Remove the line which adds the conda path to the PATH environment variable

    vi ~/.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 ~/.bashrc
    
  4. Remove 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!

    rm -rf ~/.anaconda_backup
    

Reference: Official conda documentation

Upvotes: 135

Sunil Mathew
Sunil Mathew

Reputation: 411

If you are using windows, just search for miniconda and you'll find the folder. Go into the folder and you'll find a miniconda uninstall exe file. Run it.

Upvotes: 14

Jolth
Jolth

Reputation: 61

your have to comment that line in ~/.bashrc:

#export PATH=/home/jolth/miniconda3/bin:$PATH

and run:

source ~/.bashrc

Upvotes: 2

Related Questions