TechBuzzPro

How to Uninstall Anaconda on Mac

· 5 min read · Mac

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To completely remove Anaconda from your Mac, you need to delete the installation folder, clean up your shell configuration files, and remove any leftover preference files. This guide walks you through the entire process safely, so you can free up disk space and avoid command conflicts.

What You'll Need

  • Admin access to your Mac (your user account password)
  • Terminal app (found in /Applications/Utilities/)
  • About 10 minutes of time

Step-by-Step

  1. Close all Anaconda-related apps. Quit Anaconda Navigator, Jupyter Notebook, Spyder, and any terminal windows that are using conda. This prevents file locks and ensures nothing is running during deletion.
  2. Open Terminal. You can find it in Finder > Applications > Utilities, or search for it with Spotlight (Cmd+Space).
  3. Find your Anaconda installation location. In Terminal, run:
    which conda
    This will show the path, usually /Users/yourname/anaconda3/bin/conda or /opt/anaconda3/bin/conda. Note the base directory (e.g., /Users/yourname/anaconda3).
  4. Remove the entire Anaconda folder. In Terminal, run (replace the path with your actual base directory):
    rm -rf ~/anaconda3
    If your installation is in /opt/anaconda3, use sudo rm -rf /opt/anaconda3 and enter your password when prompted. This deletes all conda environments, packages, and the base installation.
  5. Clean up your shell configuration files. Anaconda adds lines to your shell profile (e.g., .bash_profile, .zshrc, or .bashrc). Open the file with a text editor, for example:
    nano ~/.zshrc
    Look for lines containing anaconda or conda, such as:
    export PATH="/Users/yourname/anaconda3/bin:$PATH"
    Delete those lines, then save (Ctrl+O, Enter, Ctrl+X in nano). Repeat for .bash_profile and .bashrc if they exist.
  6. Remove leftover preference files. In Finder, press Cmd+Shift+G and enter ~/Library. Look for and delete any of these folders/files if they exist:
    • ~/Library/Anaconda
    • ~/Library/PreferencePanes/Anaconda.prefPane
    • ~/Library/Application Support/Anaconda
    • ~/Library/Logs/Anaconda
    You can also use Terminal: rm -rf ~/Library/Anaconda ~/Library/PreferencePanes/Anaconda.prefPane.
  7. Remove conda from your PATH (if still present). Open a new Terminal window and run which conda. If it still shows a path, you may have a leftover entry in your /etc/paths or /etc/paths.d directory. Check with ls /etc/paths.d and remove any file named anaconda using sudo rm /etc/paths.d/anaconda.
  8. Restart your Mac. This ensures all changes take effect and any cached environment variables are cleared.
  9. Verify the uninstall. After restarting, open Terminal and run which conda. It should return nothing or say conda not found. Also try python --version — if it shows a system Python (e.g., 2.7 or 3.9 from Apple), you're good.

Common Mistakes

  • Deleting only the Anaconda folder but forgetting the shell config. This leaves your PATH pointing to a non-existent directory, causing command-not-found errors.
  • Not closing all Anaconda processes. If Jupyter or Navigator is running, the deletion may fail with “file in use” errors.
  • Using the wrong path. If you installed Anaconda to a custom location, deleting ~/anaconda3 won't work. Always check which conda first.
  • Deleting system Python by accident. The rm -rf command is powerful; double-check the path before running it.

Tips

  • Before uninstalling, consider exporting your environments: conda env export > environment.yml for each environment you want to keep. You can recreate them later with a fresh install.
  • If you plan to reinstall Anaconda later, use the official installer from Anaconda.com, not an old cached one.
  • To avoid future PATH clutter, consider using Miniconda or Python's built-in venv for lighter projects.
  • Use Finder's “Go to Folder” (Cmd+Shift+G) to quickly navigate to hidden Library folders.

Troubleshooting

If “conda not found” but the folder still exists: You may have deleted the folder but not the shell config. Open your .zshrc and remove any conda lines, then restart Terminal.

If you get “Permission denied” when deleting: Use sudo before the rm command, but be absolutely sure of the path. For example: sudo rm -rf ~/anaconda3 (if your user owns it, you shouldn't need sudo).

If Terminal shows “command not found: conda” but you still see Anaconda in Finder: The folder might be in a different location. Run find ~ -name "conda" -type f 2>/dev/null to locate it, then delete the parent folder.

If your Python still points to Anaconda after uninstall: Check your shell config again for any leftover export lines. Also check /etc/paths and /etc/paths.d for anaconda entries.

If you accidentally deleted your system Python: On macOS, the system Python is managed by Apple and is not in your user folder. If you deleted something in /usr/bin/python, you can reinstall the Command Line Tools with xcode-select --install.

Frequently Asked Questions

Will uninstalling Anaconda delete my Python scripts?

No, only the Anaconda installation and its environments are removed. Your own scripts and files remain untouched.

Do I need to uninstall Anaconda before installing Python from python.org?

No, but having both can cause confusion. If you install Python from python.org, make sure its path takes priority in your shell config, or uninstall Anaconda first to avoid conflicts.

Is there an official uninstaller for Anaconda on Mac?

Anaconda does not provide a dedicated uninstaller for macOS. Manual deletion as described above is the recommended method.

What happens to my conda environments?

They are deleted along with the Anaconda folder. Export them first if you want to keep them.

Can I just delete the Anaconda folder and ignore the shell config?

You can, but your shell will still try to run conda commands and may show errors. It's best to clean the config to avoid issues.

Will uninstalling Anaconda affect other Python installations?

It may, if they share the same PATH. After uninstalling, your shell will fall back to the next Python in the PATH, which could be a different version. Check with python --version after uninstalling.