Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python - How can I completely uninstall Anaconda on Windows 10?

My installation of Anaconda has gone sideways for some reason. I noticed it when I tried to open Jupyter. The start menu shortcut was broken. When I clicked on it, I got the infamous opening and closing of a command line window. I can start it by clicking on the executable but this winds up with the notebook opening in a weird location that I can't move out of.

When I try to uninstall and reinstall, I get the same behavior as before. I did some googling and found some Stackoverflow questions like this (which I've since lost so can't post the link), but when I followed the solutions offered, I just get more of the same. I thought there might be something that needed to be blown away from appdata but that didn't seem to fix the issue either.

like image 524
Bob Wakefield Avatar asked Jan 13 '18 03:01

Bob Wakefield


2 Answers

I'm running Windows 10 Pro Version 1703 OS Build 15063.786. I'm not sure if a Windows update is what caused the issue. Ultimately, all the shortcuts were pointing to things that no longer existed. I performed the following task.

  1. Uninstall Anaconda using the standard Windows uninstall process.
  2. Reboot.
  3. Scour the ENTIRE hard drive looking for anything remotely related to the Anaconda installation and manually delete it. I don't remember all the exact folders but I do remember specifically in C:\Users\Bob, there was a .Anaconda and a .IPython and a .Jupyter file. All those had to go. C:\Users\Bob\Anaconda3 also had to be manually deleted along with some files that were just hanging out in C:\ProgramData\Anaconda3 that somehow refused to be deleted.
  4. Manually delete the shortcuts in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Anaconda3 (64-bit).
  5. Reboot.
  6. Reinstall Anaconda.
  7. Reboot.

Everything is back to normal. Special thanks to sytech. Checking the environment variables didn't provide a solution but it put me on the right investigative track.

like image 160
Bob Wakefield Avatar answered Nov 13 '22 19:11

Bob Wakefield


I think this is the official solution: https://docs.anaconda.com/anaconda/install/uninstall/

[Unfortunately I did the simple remove (Uninstall-Anaconda.exe in C:\Users\username\Anaconda3 following the answers in stack overflow) before I found the official article, so I have to get rid of everything manually.]

But for the rest of you the official full removal could be interesting, so I copied it here:

To uninstall Anaconda, you can do a simple remove of the program. This will leave a few files behind, which for most users is just fine. See Option A.

If you also want to remove all traces of the configuration files and directories from Anaconda and its programs, you can download and use the Anaconda-Clean program first, then do a simple remove. See Option B.

  1. Option A. Use simple remove to uninstall Anaconda:

    • Windows–In the Control Panel, choose Add or Remove Programs or Uninstall a program, and then select Python 3.6 (Anaconda) or your version of Python.
    • [... also solutions for Mac and Linux are provided here: https://docs.anaconda.com/anaconda/install/uninstall/ ]
  2. Option B: Full uninstall using Anaconda-Clean and simple remove.

    NOTE: Anaconda-Clean must be run before simple remove.

    • Install the Anaconda-Clean package from Anaconda Prompt (Terminal on Linux or macOS):

      conda install anaconda-clean
      
    • In the same window, run one of these commands:

      • Remove all Anaconda-related files and directories with a confirmation prompt before deleting each one:

        anaconda-clean
        
      • Or, remove all Anaconda-related files and directories without being prompted to delete each one:

        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 that Anaconda-Clean leaves your data files in the AnacondaProjects directory untouched.

    • After using Anaconda-Clean, follow the instructions above in Option A to uninstall Anaconda.

like image 40
Jakob Avatar answered Nov 13 '22 20:11

Jakob