Context: I had an unrelated issue with my Visual Studio installation and saw in the "Visual Studio Installer" that it has a "Download cache" (for me C:\ProgramData\Microsoft\VisualStudio\Packages) under "Installation locations". I went on to delete the contents of this folder (don't do that!).
Now unfortunately the "_Instances" folder inside of it is gone as well. This apparently is the location where the "Visual Studio Installer" stores all information about the installed Visual Studio versions.
Now I have 3 versions of Visual Studio installed (2017, 2019, 2022 - all in Professional version), that I can't modify or uninstall anymore because the Installer doesn't know about them.
Ideally, I just want to uninstall them fully and start again with new fresh installations, but I don't know how to uninstall them manually.
Things that already didn't work for me:
To remove Visual Studio manually, please delete following folders:
C:\Program Files (x86)\Microsoft Visual Studio
C:\Program Files\Microsoft Visual Studio
%programdata%\Microsoft\visualstudio\packages
Back up and then delete following Registry keys(press Win + R, run regedit
):
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\VisualStudio\Setup
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\Setup
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\Setup
After that download a new setup file, put it into a new empty folder and run it to reinstall VS.