How to uninstall Anaconda on Mac once and for all (no leftovers)

182.7K views
10 min read

Anaconda is quite popular among data scientists as it simplifies Python and R programming. It's widely used for tasks such as machine learning and data analysis. But while it's powerful, you may want to uninstall it to free up disk space, switch to another development environment, or discontinue its use altogether.

However, uninstalling Anaconda isn't as simple as dragging the icon to the trash folder. The software package has lots of hidden files, environment variables, and configurations you need to deal with to ensure the program is completely removed from your Mac. It's quite a snake.

I remember how tough it was for me to uninstall the distribution for the first time as it leaves a lot of clutter, but I'll show you different ways — from quick app-based solutions to manual removal methods.

Ways to remove Anaconda on Mac

Before we proceed, let’s quickly review ways to remove Anaconda quickly:

I want to What to do
Uninstall Anaconda in a few clicks Use CleanMyMac’s Applications feature.
Remove Anaconda manually Use Terminal’s conda remove anaconda-navigator command.
Remove Anaconda from .bash_profile Use the inbuilt Nano editor on Terminal.
Remove Anaconda with Finder Remove /anaconda3 or /opt/anaconda3 via Go > Go to Folder.
Uninstall Miniconda Remove directory rm -rf ~/miniconda3 or sudo rm -rf /opt/anaconda3 in Terminal.
Verify Anaconda is fully uninstalled Run conda --version and then echo $PATH in Terminal to ensure there are no directories left.

How to uninstall Anaconda on Mac in one click

There are a few ways to get rid of the Anaconda on Mac, and I’m going to start with my favorite method. It’s the quickest one and takes almost no effort at all.

Uninstall Anaconda using CleanMyMac

Using CleanMyMac is the easiest and fastest way of uninstalling Anaconda. This is also my favorite Mac optimization tool, as it removes all hidden installation files, eliminates duplicates, and optimizes performance to ensure my Mac is running as new.

Here's how to completely uninstall Anaconda using CleanMyMac:

  1. Install and open CleanMyMac.
  2. Go to the Applications tab, then click Scan.
  3. Click Manage My Applications after the scan.
  4. Select Anaconda-Navigator under Uninstaller > All Applications. Ensure everything is selected.
  5. Then, click Uninstall.

After you click Uninstall, CleanMyMac will remove all Anaconda-associated files, as they may slow your Mac or cause it to misbehave.

Completely remove Anaconda from Mac manually with Terminal

If you prefer a manual approach (and you're a total pro) where you have total control, you can uninstall the distribution using Terminal.

Here's how to remove Anaconda from Mac with Terminal:

  1. Go to Finder > Applications > Utilities > Terminal.
  2. Type conda remove anaconda-navigator > Press Return to confirm the deletion.

3. Then, uninstall the directory using the command rm -rf ~/anaconda3 or sudo rm -rf /opt/anaconda3 (for system-wide installations). For the latter, enter your password when prompted.

4. Delete hidden files and directories using the command rm -rf ~/.condarc ~/.conda ~/.anaconda ~/.continuum.

5. Close Terminal. You should no longer see the (base) environment indicator when you launch it again.

Remove Anaconda from .bash_profile

When you install Anaconda, the PATH variable in your .bash_profile is modified to add its bin directory. This is useful when you are using the distribution, as it allows you to use Anaconda-related commands (like conda) directly from Terminal. 

However, now that you've uninstalled Anaconda, the changes here will refer to directories that don't exist, so they may cause errors when opening Terminal or lead to the use of incorrect versions of Python.

You can edit the .bash_profile using the inbuilt Nano editor on Terminal.

Here's how to edit the file using the Nano editor:

  1. Go to Finder > Applications > Utilities > Terminal.
  2. Type nano ~/.zshrc > Press Return.
  3. Look for the block of text between the lines:
  • # >>> conda initialize >>>

  • # <<< conda initialize <<<

4. Use Option + K to delete everything.

5. Save and exit by pressing Control + X, then Y, and press Return.

6. Reload the profile by typing the command source ~/.zshrc.

You can then quit Terminal.

Remove Anaconda from Mac manually via Finder

Maybe you've had enough of Anaconda's hidden files and want to ensure the installation is actually gone. In that case, you can delete the files manually using Finder.

Here's the step-by-step process:

  1. Open Finder.
  2. Click Go in the menu bar > Go to Folder.
  3. Type /anaconda3 or /opt/anaconda3 if you installed Anaconda system-wide and press Return.
  4. Select all files and right-click > Choose Move to Trash.

5. Delete the anaconda3 folder. You can do this by going back to the opt folder (Go > Go to Folder> /opt) or the home location using Command + Shift + H.

6. Right-click on the Trash icon and click on Empty Trash.

You've now deleted Anaconda. From there, you can edit the .bash_profile or the .zshrc file. To do so:

  1. Open Finder > Press Command + Shift + H to go to the home folder.
  2. Press Command + Shift + . to show hidden files.
  3. Click on .bash_profile (for bash users) or .zshrc (for zsh users). You can choose your preferred editor, but I recommend CodeRunner as it makes editing and running code easy and fast.
  4. Delete everything within (and including) the # >>> conda initialize >>> and # <<< conda initialize <<< block.

In some cases, especially when you have a system-wide installation, the .bash_profile file may be locked. If that's the case, you can go to the Terminal and type the command sudo chown your_user_name ~/.bash_profile. This should give you permission to edit the file. 

Note that for macOS Sequoia, you'll most likely edit the .zshrc file instead of .bash_profile, as zsh is the default shell now.

How to uninstall Miniconda on a Mac

Maybe you didn't want to install Anaconda, as it's quite comprehensive, so you chose to install the simpler version, Miniconda. It doesn't come with many preinstalled packages but still creates directories and configuration files specific to its environment.

To remove Miniconda completely, the process you need to follow is similar to removing Anaconda.

Here's how to go about it:

  1. Go to Finder > Applications > Utilities > Terminal.
  2. Uninstall the Miniconda directory by running the command rm -rf ~/miniconda3 or sudo rm -rf /opt/anaconda3. Enter your password if prompted.
  3. Delete the associated configuration files using the command rm -rf ~/.condarc ~/.conda ~/.continuum.

You can now go ahead and edit the .bash_profile or .zshrc file to remove Miniconda edits.

Verify Anaconda is fully uninstalled

Considering Anaconda is quite tricky to uninstall completely, it's important to verify that it's actually gone. You don't want hidden files or settings that could slow down your Mac or cause issues down the line.

Here's how to verify uninstalling Anaconda:

  1. Go to Finder > Applications > Utilities > Terminal > See if the (base) indicator is gone.
  2. Type the command conda --version to see if the system still recognizes the Anaconda or its package manager (conda).

If Anaconda was properly uninstalled, you shouldn't see the (base) indicator, and the version check should bring up the error "conda not found." If you see a version number or a response somehow related to conda, it means there are still some remnants in your system. 

Once you've verified the installation isn't there, you can check whether the directory is still present. To do this:

  1. Go to Finder > Applications > Utilities > Terminal.
  2. Type the command echo $PATH and look through the output to ensure there's no Anaconda directory – /opt/anaconda3/bin or ~/anaconda3/bin. If these directories are still present, you might need to manually remove them from your PATH in the .bash_profile or .zshrc file.

Completely uninstalling Anaconda on Mac

Completely uninstalling Anaconda on Mac can be tricky due to the hidden files and configurations, but it doesn't have to be a headache. If you are looking for the easiest way, CleanMyMac is your trusted sidekick that can help uninstall all apps (and their dependencies) and smoothen all your Mac operations. 

If you want a more hands-on approach, you can use Core Shell as an alternative to Terminal. It's more powerful and customizable, and it makes managing multiple hosts easy through a dedicated GUI. Besides these, CodeRunner is perfect for editing those pesky shell file entries, and PathFinder is superb at managing files and directories through its dual-pane interface. All these apps are available on Setapp — a cool platform with over 250 macOS and iOS under a single subscription plan — and you can try them out free for 7 days!

FAQ

Where is Anaconda installed on a Mac?

Anaconda is typically installed in the user directory under the folder name "anaconda3".

Here’s how to find Anaconda’s installation path on your Mac:

  1. Open Finder > Applications > Utilities > Terminal.
  2. Type echo $CONDA_PREFIX and press Return.
  3. Check the output:
  • For single-user: /Users/your-username/anaconda3
  • For system-wide: /opt/anaconda3

How to check if Anaconda is installed or not?

To check if Anaconda is installed on your Mac:

  1. Open Finder > Applications > Utilities > Terminal.
  2. Type conda --version and press Return.
  3. If Anaconda is installed, you'll see the version number.

Optional: Type echo $PATH to check if Anaconda’s directory appears in the output.

250+ apps for all your daily tasks.

Sign up to Setapp and try them for free.

Security-tested