Guide to Removing Anaconda from Your System
Standard Uninstallation
The simplest method to remove Anaconda involves deleting the installation directory and using the system's built-in uninstaller. This approach leaves configuration files behind but is sufficient for most users.
Windows
Before running the uninstaller, open the installation root directory and manually delete the envs and pkgs folders to prevent potential errors. Then, navigate to the Control Panel, select "Add or Remove Programs" (or "Programs and Features"), locate the Python version associated with Anaconda, and execute the uninstaller.
macOS and Linux
Open a terminal window. Remove the entire Anaconda directory using the rm command. The directory name typically matches the version installed, such as anaconda3 or anaconda2.
rm -rf ~/anaconda3Complete Removal with Anaconda-Clean
To erase all traces of Anaconda, including configuration files and directories, use the anaconda-clean utility. This step must be performed before deleting the main installation directory.
- Install the cleanup tool via the terminal (or Anaconda Prompt on Windows):
conda install anaconda-clean - Execute the utility. To verify each file before deletion, run:
anaconda-clean - Alternatively, to remove all associated files without confirmation prompts, use the force flag:
anaconda-clean --yes
This utility creates a backup of any removed files in a directory named .anaconda_backup within the home folder. After running the cleaner, proceed with the standard uninstallation steps described previously.
Cleaning Environment Variables
On Linux and macOS, Anaconda adds a path entry to the shell configuration file. Check files such as .bash_profile, .bashrc, or .zshrc in the home directory for a line similar to:
export PATH="/home/user/anaconda3/bin:$PATH"Remove or comment out this line to prevent the shell from attempting to load Anaconda paths that no longer exist. Save the file and restart the terminal for the changes to take effect.