Remove Anaconda From Windows Completely

Anaconda distribution has many dependencies – configuration files, applications, a navigator, and a prompt, among other features. If we simply uninstall anaconda from the Control Panel, some files will be left behind.

If you want to remove all traces of the configuration files and directories from the anaconda and its programs after uninstalling anaconda, use either of these two methods (you can run commands on Command Prompt or Windows Powershell):

  • Method A: Uninstall Anaconda using the anaconda-clean package, and,
  • Method B: Using the Uninstall-Anaconda executable that comes with Anaconda

Method A: Remove anaconda using anaconda-clean

Step 0: Ensure that you can run conda

To do that, just run “conda” on the command line. If anaconda has not been added to the PATH environment, this will through the error message: ‘Conda’ is not recognized as an internal or external command. The solution to this error is provided in the last section of this article.

Step 1: Install the anaconda-clean package using conda

Run the following line on the command line.

conda install anaconda-clean

Step 2: Run anaconda-clean

Then, run anaconda-clean to remove all Anaconda-related files and directories. By default, the command will issue a confirmation prompt before deleting each instance.

You can issue “–yes” argument for removing all those files and directories without being asked to confirm the deletion of each one. We want to go with the second choice.

If you want to confirm each file and directory you are deleting, run this command:

anaconda-clean

If you don’t want to be asked about each file and directory, use,

anaconda-clean --yes

Note: anaconda-clean will create a backup of files and directories that might be removed during uninstallation in a folder named .anaconda_backup in your home directory (C:\Users\<your_username>). You can remove this hidden folder after going through the rest of the steps.

Step 3: Remove anaconda from your programs

For that, head to “Control Panel>Programs>Programs and Features” and Uninstall Anaconda from the list.

You can also uninstall anaconda from Apps. For that, Go to the Start Menu and search “Add or remove programs“, then search and remove anaconda from your Apps list.

Method B: Remove anaconda using Uninstall-Anaconda.exe

In the folder where anaconda is installed (by default, it is C:\Users\<your_username>\Anaconda3), there’s an uninstaller called Uninstall-Anaconda.exe. Double-click on this executable to start removing the anaconda.

That should remove anaconda.

Last thing: For either method, you might need to remove installed environments (anaconda3\envs) and package (anaconda3\pkgs) folders in your user folder (C:\Users\<your_username>).

Solve: ‘Conda’ is not recognized as an internal or external command

This error occurs because the anaconda is not added to the PATH environment variable. We can do that by following these steps:

Step 1: Open Advanced System Settings

You can search it in the Start Menu as shown below.

Step 2: Go into Environment Variables

Step 3: Edit Path

Step 4: Add the following 3 paths to the Path Environment

C:\Users\<your_username>\Anaconda3\Scripts
C:\Users\<your_username>\Anaconda3
C:\Users\<your_username>\Anaconda3\Library\bin

Step 5: Once done, you need to restart the command line before using “conda“.