0

I have a bug persisting across all virtual environments and the base environment, even after uninstalling Anaconda "completely" as described here then reinstalling; clearly something remains. How can I ensure everything's truly deleted?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
OverLordGoldDragon
  • 1
  • 9
  • 53
  • 101

2 Answers2

6

The Anaconda uninstaller leaves out .conda and .anaconda_backups, where much metadata remains cached. Further, some packages install their own folders outside of the root Anaconda folder which aren't targeted by the uninstaller. Lastly, for "completeness", we may delete Registry keys, but this shouldn't be necessary most of the time.

Below are the steps I took to resolve my problem with Spyder; for other packages, simply replace "spyder" in pertinent steps.

  1. Delete Anaconda/envs and Anaconda/pkgs

  2. Run Uninstall-Anaconda3.exe

  3. Optional: Start -> Run -> regedit, delete:

    • HKEY_CURRENT_USER -> Software -> Python
    • HKEY_LOCAL_MACHINE_USER -> SOFTWARE -> Python
  4. Delete:

    • C:\Users\.conda
    • C:\Users\.anaconda_backup
    • C:\Users\.spyder
    • C:\Users\.spyder-py3 NOTE: backup config folder inside before deleting
    • C:\Users\Name\AppData\Local\conda
    • C:\Users\Name\AppData\Local\Spyder
    • C:\Users\Name\AppData\Local\Temp\spyder
    • C:\Users\Name\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Anaconda3 (64-bit)
    • C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Python 3.7
  5. Search **conda**, then **spyder**, in C: and D: to ensure nothing remains, except:

    • Anaconda3-2020.02-Windows-x86_64.exe (assuming already installed; can be another version)
    • Files in .vscode\extensions
    • Files in Microsoft Visual Studio\...\Extensions
  6. If conda or Python (PYTHONPATH) are system environment variables, remove them

  7. Reboot device

  8. Validate hashes

  9. Close other applications

  10. Run Anaconda3-2020.02-Windows-x86_64.exe

  11. Launch Anaconda Powershell Prompt

  12. spyder

Note that this doesn't guarantee everything is "truly absolutely" deleted; for that one needs to format the hard drive, but this shouldn't ever be necessary.

OverLordGoldDragon
  • 1
  • 9
  • 53
  • 101
0

You can remove the Anaconda directory by typing:

rm -rf ~/anaconda3

or you can use the Anaconda clean command like so:

conda install anaconda-clean anaconda-clean --yes'

After running the two commands above the run the rm command at the top.

Natsfan
  • 4,093
  • 3
  • 22
  • 29