Artificial intelligence and machine learning are becoming more and more prevalent in the modern world. If you’re working in this field or just curious about it, and you’re using Python, you might have come across Anaconda. This coding tool is designed specifically for data science.
But if you’re finished using it, want to free up some space on your internal drive, or test a different app, how do you uninstall Anaconda from your Mac? Read on to find out.
Before we start
If you’re having problems with your Mac and Anaconda, the cause might actually be malware. Running a scan with MacKeeper can help to eliminate that as a factor.
- In MacKeeper, select Antivirus in the sidebar
- Click Start scan
- If MacKeeper finds anything, select it, and click Move to quarantine
MacKeeper also comes with VPN, memory cleaning and more. Download it and give it a try. You’ll get one free fix for each tool, so you can test it fully first.
In this guide, we’ll cover the following:
- Uninstalling Anaconda manually
- Uninstalling Anaconda with Terminal
- Uninstalling Anaconda prompt package
- How to delete Miniconda from Mac
- Removing Anaconda PATH from .bash_profile
How to delete Anaconda manually
It’s possible to look through your system disk using Finder to uninstall Anaconda. You just need to know where to look.
Here’s how to uninstall Anaconda manually in macOS:
1. If Anaconda is running, make sure to quit out of it first. Use Activity Monitor to stop any background processes it might be running
2. In the Applications folder, locate the Anaconda icon. Right-click it, and select Show Original
3. Delete the anaconda3 folder and its contents. Note: it may have a slightly different name, like anaconda2
4. In Finder, click Go > Go to Folder
5. Type ~/Library/Receipts, and press Enter
6. Find and move to trash all Anaconda-related files:
How to uninstall Anaconda with Terminal
You can also delete Anaconda using Terminal. Terminal is a useful Apple utility that lets you control your computer through text commands.
Here are the commands to delete Anaconda in Terminal:
- Launch Terminal from Applications > Utilities > Terminal
- Copy and paste the command rm -rf ~/anaconda to delete the entire catalog of Anaconda files
How to uninstall the Anaconda prompt package
To delete the Anaconda prompt package, open Terminal and type in the following commands:
- To delete a SciPy package in the myenv environment: conda remove -n myenv scipy
- To delete a SciPy package in the current environment: conda remove scipy
- To remove several packages simultaneously (e.g. SciPy and cURL): conda remove scipy curl
- To confirm that a package has been removed, check the full list of packages with the conda list command
How to uninstall Miniconda on a Mac
Simply put, Miniconda is a smaller version of Anaconda. You can also uninstall it through Terminal.
You can uninstall Miniconda on your Mac using these steps:
- Open Terminal and type in rm -rf ~/miniconda
- You can then edit ~./bash_profile for complete uninstallation of Miniconda from your PATH environment variable.
- Finally, remove hidden files from the home directory by running rm -rf ~/.condarc ~/.conda ~/.continuum
How to remove Anaconda PATH from .bash_profile
The final stage of uninstalling Anaconda is deleting the PATH from .bash_profile that it has created. There are two ways to do so.
How to remove the Anaconda PATH from .bash_profile using Terminal:
1. Type in the command export PATH=”/Users/jsmith/anaconda3/bin:$PATH”. In this case, jsmith is your actual username
You can also manually remove the Anaconda PATH from .bash_profile:
1. In Finder, select your username
2. Press the left Shift + Cmd and Period keys together to hidden files and folders
3. Locate the hidden .bash_profile file and open it
4. Find the line that says export PATH="/Users/username/opt/anaconda3/bin:$PATH", and delete it
5. Save and close the file
Do I have to uninstall Python before installing Anaconda?
You don’t have to delete or change Python before installing Anaconda. There is nothing that needs altering with globally installed packages from PIP, including Pandas and NumPy. There should also be no conflicts during joint installation — you can install Anaconda and Miniconda as per usual.
Does uninstalling Anaconda uninstall Python?
If Python was installed on your Mac before you downloaded Anaconda, it will return to its initial state.