How To uninstall Miniconda Mac

To completely uninstall Miniconda on your Mac, follow this straightforward step-by-step guide. Uninstalling frees up disk space and removes any Miniconda-related configurations to prevent conflicts with other Python environments.


Before uninstalling, ensure no Miniconda, conda, or Python processes are running. This avoids file access issues during removal.

  • Open Activity Monitor (find it in Applications > Utilities).
  • Use the search bar to find processes mentioning Miniconda, conda, or Python.
  • Select any found processes, then click the “X” icon in the toolbar to quit them.
  • Close Activity Monitor.

Step 2: Optional Backup of Your Conda Environments

If you want to save your Conda environments to restore later, open Terminal and back up each environment:

conda env export --name <ENV_NAME> > <ENV_NAME>.yaml

Replace <ENV_NAME> with your environment’s name. This creates a YAML file you can use to recreate the environment after reinstalling.


Step 3: Remove the Miniconda Installation Directory

In Terminal (Applications > Utilities > Terminal), run the following command to delete Miniconda’s main files. The typical install locations are ~/miniconda3 or ~/opt/miniconda3:

rm -rf ~/miniconda3

or if installed in /opt:

sudo rm -rf /opt/miniconda3

Use sudo only if needed based on where Miniconda was installed.


Step 4: Clean Up Shell Configuration Files

Miniconda modifies shell startup files to initialize Conda every time a terminal session starts. You need to remove these references.

  • In Terminal, open your shell profile in a text editor. Depending on your shell and macOS version, it might be:
    • For zsh (default in macOS Catalina and later):
      nano ~/.zshrc
      
    • For bash (older macOS or if you use bash explicitly):
      nano ~/.bash_profile
      
  • Look for any lines mentioning Miniconda, conda, or PATH modifications related to Miniconda.
  • Delete these lines carefully.
  • Save and exit (Ctrl + O, Enter, then Ctrl + X in nano).
See also  How to Screen Mirror on Mac

Step 5: Remove Additional Configuration and Cache Files

Still in Terminal, run these commands to delete residual config files and caches Miniconda may have stored in hidden folders within your home directory:

rm -rf ~/.condarc ~/.conda ~/.continuum

These files store user-specific Conda settings and caches.


Step 6: Restart Your Terminal

Close the Terminal window and open a new one. Your prompt should no longer show the (base) environment or any references to Conda/Miniconda.


Bonus Tips

  • If you installed Miniconda system-wide (e.g., using .pkg installer to /opt/miniconda3), use sudo with removal commands as shown in Step 3.
  • Running the command conda init --reverse --all can optionally reverse changes Miniconda made to your terminal initialization scripts, but manual editing as described is often more reliable.

By following these bolded, clear steps, you’ll fully remove Miniconda from your Mac while ensuring no leftover files or environment settings interfere with your system or other Python tools. This keeps your Mac clean and ready for any fresh Python setup you prefer.