Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python Anaconda - How to Safely Uninstall

People also ask

How do I completely uninstall Anaconda and Python?

Step 1: Launch the tool in the Control Panel. Then, click the Uninstall a Program item under Programs. Step 2: Programs and Features item will launch in a few moments. Find Anaconda in the programs list, right-click it and then left-click the Uninstall option, or use the Uninstall button above the program list.

How do I permanently delete my Anaconda?

To use Uninstall-Anaconda.exe in C:\Users\username\Anaconda3 is a good way. Show activity on this post. Method1: To uninstall Anaconda3 go to the Anaconda3 folder, there u will be able to find an executable called Uninstall-Anaconda3.exe, double click on it. This should uninstall ur application.

Should I uninstall Python after installing Anaconda?

Yes to have both installed No to uninstall 3.7 and install Anaconda.

Can I delete Anaconda installer?

Yeah, they can be removed. The Live install method works by copying the actual Live contents to the target system, and of course Anaconda has to be part of those contents so you can run it and do the install. If space is at a premium, you can remove them. Yes, is only a installer.


From the docs:

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.

Further notes:

  • 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.


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)

Refer: https://docs.anaconda.com/anaconda/install/uninstall for more details.

Note: Also, you may want to edit .bashrc (or .bash_profile) & remove the conda path in $PATH environment variable for full proper clean-up


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.

It looks like this

PATH="/home/linuxsagar/anaconda3/bin:$PATH

So, just comment out the line (add # in the beginning of the line). Then reload the ~/.bashrc file executing source ~/.bashrc

Now, verify the changes executing which python in the new terminal.