Uninstalling Miniconda#

To uninstall your Miniconda installation:

  1. (Optional) If you have created any environments outside your anaconda3 directory, you can manually delete them to increase available disc space on your computer. This step must be performed before uninstalling Miniconda.

    Uninstall environments outside the anaconda3 directory
    1. Open Anaconda Prompt.

    2. View a list of all your environments by running the following command:

      conda info --envs
      

      If you have any environments in a directory other than anaconda3, you will need to uninstall the directory that contains the environments. Uninstalling the directory with the following command will both delete the environment files and deregister the environments.

    3. Open your preferred shell.

    4. Uninstall the directory by running the following command:

      # Replace <YOUR_USERNAME> with your Windows username
      # Replace <PATH_TO_ENV_DIRECTORY> with the path to the directory that contains the environments
      C:\Users\<YOUR_USERNAME>\miniconda3\_conda constructor uninstall --prefix <PATH_TO_ENV_DIRECTORY>
      
  2. Search for “Control Panel” in the Windows search box and select the Control Panel app.

  3. Click Uninstall a program under Programs.

  4. Select Miniconda from the list of programs.

  5. Click Uninstall.

  6. Follow the on-screen instructions to complete the uninstallation process.

Silent CLI uninstall

On Windows operating systems, you can silently uninstall Miniconda using either Command Prompt or PowerShell.

Open a new Command Prompt window and run the following command:

start /wait .\miniconda3\Uninstall-Miniconda3.exe /S

As of Miniconda v24.11.1, you can also use additional arguments to remove other files from your system.

Optional uninstall arguments
/RemoveCaches=[0|1]

Removes caches (e.g., package and index caches, etc.).

/RemoveConfigFiles=[none|user|system|all]

Removes configuration files such as .condarc files. user removes the files inside the current user’s home directory and system removes all files outside of that directory.

/RemoveUserData=[0|1]

Removes user data, such as the %USERPROFILE%/.conda directory.

Caution

Using these arguments is not recommended if you have multiple conda installations.

The following command is an example of how the uninstall arguments could be used:

start /wait .\miniconda3\Uninstall-Miniconda3.exe /S /RemoveCaches=1 /RemoveConfigFiles=user /RemoveUserData=1

Open a new PowerShell window and run the following command:

Start-Process -FilePath ".\miniconda3\Uninstall-Miniconda3.exe" -ArgumentList "/S" -Wait

As of Miniconda v24.11.1, you can also use additional arguments to remove other files from your system.

Optional uninstall arguments
/RemoveCaches=[0|1]

Removes caches such package caches.

/RemoveConfigFiles=[none|user|system|all]

Removes configuration files such as .condarc files. user removes the files inside the current user’s home directory and system removes all files outside of that directory.

/RemoveUserData=[0|1]

Removes user data, such as the ${env:USERPROFILE}/.conda directory.

Caution

Using these arguments is not recommended if you have multiple conda installations.

The following command is an example of how the uninstall arguments could be used:

Start-Process -FilePath ".\miniconda3\Uninstall-Miniconda3.exe" -ArgumentList "/S /RemoveCaches=1 /RemoveConfigFiles=user /RemoveUserData=1" -Wait
  1. Open a new terminal application window.

  2. (Optional) If you have created any environments outside your anaconda3 directory, you can manually delete them to increase available disc space on your computer. This step must be performed before uninstalling Miniconda.

    Uninstall environments outside the anaconda3 directory
    1. View a list of all your environments by running the following command:

      conda info --envs
      

      If you have any environments in a directory other than anaconda3, you will need to uninstall the directory that contains the environments. Uninstalling the directory with the following command will both delete the environment files and deregister the environments.

    2. Uninstall the directory by running the following command:

      # Replace <PATH_TO_ENV_DIRECTORY> with the path to the directory that contains the environments
      ~/miniconda3/_conda constructor uninstall --prefix <PATH_TO_ENV_DIRECTORY>
      
  3. Deactivate your base environment by running the following command:

    conda deactivate
    

    You should no longer see (base) in your terminal prompt.

  4. As of Miniconda v24.11.1, an uninstaller.sh script is available to help you remove Miniconda from your system. Run the basic script to remove Miniconda and its shell initializations, or add arguments to remove additional user or system files. If your version does not have the uninstaller script, use the instructions under Manual uninstall.

    Note

    If you have installed Miniconda into a system location, you must use sudo -E to run the uninstaller.

    For example, the .pkg installer for macOS installs Miniconda into a system location, /opt/miniconda3.

    ~/miniconda3/uninstall.sh
    
    sudo -E ~/opt/miniconda3/uninstall.sh
    

    Caution

    • Including additional uninstall arguments is optional. These arguments remove additional files from your system. Using these arguments is not recommended if you have multiple conda installations.

    • If any files outside the installation directory are symlinks, it’s possible that only the link will be removed, and not the underlying files, meaning you’ll need to find and delete them manually.

    Optional uninstall arguments
    --remove-caches

    Removes caches (e.g., package and index caches, etc.).

    --remove-config-files {user,system,all}

    Removes configuration files such as .condarc files. user removes the files inside the current user’s home directory and system removes all files outside of that directory.

    --remove-user-data

    Removes user data, such as the ~/.conda directory.

    The following command is an example of how the uninstall arguments could be used:

    ~/miniconda3/uninstall.sh --remove-caches --remove-config-files user --remove-user-data
    
    1. (Optional) Remove any conda initialization scripts from all your terminal shell profiles by running the following command:

      conda activate
      conda init --reverse --all
      
    2. Remove your entire miniconda3 directory with rm -rf. Depending on your installation, this directory will be in your root folder or in your opt folder.

      Warning

      When paired with the -r (recursive) flag, the f (force) flag deletes all specified directories and the files within them without prompting you for confirmation. Double-check and verify that you have correctly specified the directories you intend to delete before running rm -rf, as this action can’t be undone.

      # The following are a few examples of how you might need to delete your miniconda3 folder
      rm -rf miniconda3
      rm -rf ~/miniconda3
      sudo rm -rf /opt/miniconda3
      
    3. (Optional) Remove the hidden .condarc file and .conda and .continuum directories from your home directory by running the following command:

      Caution

      Consider keeping a backup of the .condarc file, especially if you have custom configurations for conda and are planning on reinstalling.

      rm -rf ~/.condarc ~/.conda ~/.continuum
      
  5. Close and reopen your terminal to refresh it. You should no longer see (base) in your terminal prompt.