- Python Anaconda — How to Safely Uninstall
- 19 Answers 19
- Uninstalling Anaconda Distribution#
- Full Uninstall#
- Simple remove#
- Windows#
- macOS or Linux#
- Removing Anaconda path from .bash_profile#
- Руководство по установке и удалению Anaconda Distribution в Linux
- Установка Anaconda в Linux
- Шаг 1: Загрузите правильную версию Anaconda
- Шаг 2: Установка Anaconda через установщик командной строки
- Сделать Анаконду доступной для других пользователей
- Удаление Anaconda из Linux
Python Anaconda — How to Safely Uninstall
I installed Python Anaconda on Mac (OS Mavericks). I wanted to revert to the default version of Python on my Mac. What’s the best way to do this? Should I delete the ~/anaconda directory? Any other changes required? Currently when I run which python I get this path: /Users/username/anaconda/bin/python
@PeterWang conda can’t deploy on AWS, I am having a lot of trouble getting it to work and also can’t use pip/virtualenv when I have anaconda installed.
@PeterWang Anaconda overrites my default mac interpreter which by default is used by pip for module installs. I wasted about an hour of my time today trying to figure out why my modules weren’t being loaded.
how does one uninstall conda if in addition it cannot find the conda command but the directory still exists?
19 Answers 19
To uninstall Anaconda open a terminal window and remove the entire anaconda install directory: rm -rf ~/anaconda . You may also edit ~/.bash_profile and remove the anaconda directory from your PATH environment variable, and remove the hidden .condarc file and .conda and .continuum directories which may have been created in the home directory with rm -rf ~/.condarc ~/.conda ~/.continuum .
- Python3 installs may use a ~/anaconda3 dir instead of ~/anaconda .
- You might also have a ~/.anaconda hidden directory that may be removed.
- Depending on how you installed, it is possible that the PATH is modified in one of your runcom files, and not in your shell profile. So, for example if you are using bash, be sure to check your ~/.bashrc if you don’t find the PATH modified in ~/.bash_profile .
The anaconda installer adds a line in your ~/.bash_profile script that prepends the anaconda bin directory to your $PATH environment variable. Deleting the anaconda directory should be all you need to do, but it’s good housekeeping to remove this line from your setup script too.
There may also be ~/.continuum and ~/.spyder2 and ~/.cache and ~/.distlib and ~/.matplotlib directories, which you should also delete.
In your home directory ( ~/ ), there is also a backup file created by anaconda: .bash_profile-anaconda.bak , which backup your original .bash_profile . You can compare that file with your current .bash_profile , and after that, you can safely remove the .bash_profile-anaconda.bak file.
Package «anaconda clean«, available from Anaconda platform, should uninstall safely.
conda activate your_conda_env # activate your conda environment conda install anaconda-clean # install the package anaconda clean anaconda-clean --yes # clean all anaconda related files and directories rm -rf ~/anaconda3 # removes the entire anaconda directory rm -rf ~/.anaconda_backup # anaconda clean creates a back_up of files/dirs, remove it # (conda list; cmd shouldn't respond after the clean up)
Note: Also, you may want to edit .bashrc (or .bash_profile) & remove the conda path in $PATH environment variable for full proper clean-up
I had a second installation of anaconda via brew. To uninstall it I needed to call brew cask uninstall anaconda in addition.
Using this answer I lost my PATH and had to reset it. Wasn’t a big issue seeing as mine’s a brand new machine with no customised PATH (yet). but wanted to comment in order to warn anyone who risks losing some import PATH configuration.
Removing the Anaconda directory helps, but I don’t think that’s a good idea as you might need to use anaconda sometimes in near future. So, as suggested by mwaskom, anaconda installer automatically adds PATH variable which points to anaconda/bin directory in the ~/.bashrc file.
PATH mt24">)" data-controller="se-share-sheet" data-se-share-sheet-title="Share a link to this answer" data-se-share-sheet-subtitle="" data-se-share-sheet-post-type="answer" data-se-share-sheet-social="facebook twitter devto" data-se-share-sheet-location="2" data-se-share-sheet-license-url="https%3a%2f%2fcreativecommons.org%2flicenses%2fby-sa%2f3.0%2f" data-se-share-sheet-license-name="CC BY-SA 3.0" data-s-popover-placement="bottom-start">Share)">edited Nov 7, 2017 at 14:55 Luboš Turek6,2738 gold badges40 silver badges50 bronze badgesanswered May 22, 2016 at 18:25 sgirisgiri69112 silver badges28 bronze badges