Uninstalling Anaconda Distribution¶
When uninstalling Anaconda, you have two options: a full uninstall or a simple remove. A simple remove is fine for most users. If you don’t want to completely remove every aspect of Anaconda Distribution from your computer, skip to Simple remove.
On this page:
Full Uninstall¶
A full uninstall removes all traces of the configuration files and directories from Anaconda and its programs with the anaconda-clean
program.
In Windows, open Anaconda Prompt. In Mac or Linux, open your terminal application.
Install the
anaconda-clean
package:conda install anaconda-cleanThen, run
anaconda-clean
. Run the command by itself to remove all Anaconda-related files and directories with a confirmation prompt before deleting each one, or use the--yes
argument to remove all those files and directories without being asked to confirm each one.# If you want to confirm each file and directory you are deleting anaconda-clean # If you don't want to be asked about each file and directory anaconda-clean --yes
anaconda-clean
creates a backup of all files and directories that might be removed in a folder named.anaconda_backup
in your home directory. Also note thatanaconda-clean
leaves your data files in the AnacondaProjects directory untouched.
- After using
anaconda-clean
, follow the instructions in Simple remove to finish uninstalling Anaconda Distribution.
Simple remove¶
A simple remove will leave a few files behind, which for most users is just fine.
Windows¶
- Open the file explorer.
- Delete your environment (
anaconda3\envs
) and package (anaconda3\pkgs
) folders in your user folder. - Open Add or remove programs and uninstall your Anaconda installation or your version of Python.
macOS or Linux¶
Open your terminal application.
Remove your entire Anaconda directory with
rm -rf
. Depending on your installation, youranaconda2
oranaconda3
directory will be in your root folder or in your opt folder.# The following are a few examples of how you may need to delete your Anaconda folder rm -rf anaconda3 rm -rf ~/anaconda3 rm -rf ~/opt/anaconda3
Close and reopen your terminal to refresh it. You should no longer see
(base)
in your terminal prompt.
Removing Anaconda path from .bash_profile¶
If you use Linux or macOS, you may also wish to check your .bash_profile
or .zprofile
file in your home directory for a line such as:
export PATH="/Users/jsmith/anaconda3/bin:$PATH"
Note
Replace /Users/jsmith/anaconda3/
with your actual path.
This line adds the Anaconda path to your PATH environment variable. It may refer to either Anaconda or Miniconda. After uninstalling Anaconda, delete this line.
- Make sure you’re in your home directory. The easiest way to do this is to open a new terminal window.
- Enter
open .bash_profile
oropen .zprofile
to open your terminal’s profile file. - Delete the above line from the file.
- Save.
- Close and reopen your terminal to refresh it.