
If a value is specified, only products with a version that start with this string value will be removed. Use this switch if you intend to reinstall the same version of Visual Studio. It removes only the main installation directory and product information. Switchĭefault if no other switch is passed. Then, when the workload selection screen is displayed, close the window and follow the steps on this page again. Follow the instructions to install Visual Studio. If you can't find InstallCleanup.exe under the Visual Studio Installer directory, which is always located at %ProgramFiles(x86)%\Microsoft Visual Studio, here's what to do next. The double quotes enclose a command containing spaces: By default, the path of the tool is as follows. Right-click Command Prompt, and then choose Run as administrator.Įnter the full path of the InstallCleanup.exe tool and add the command-line switch you prefer.Type cmd in the "Type here to search" box.To open an administrator command prompt, follow these steps: Here's how to run the InstallCleanup.exe tool: If you experience a catastrophic error and can't repair or uninstall Visual Studio, you can run the InstallCleanup.exe tool to remove installation files and product information for all installed instances of Visual Studio 2017, Visual Studio 2019, or Visual Studio 2022. This tool might uninstall features from other Visual Studio installations or other products, which then might also need to be repaired or reinstalled. Use the InstallCleanup tool only as a last resort if repair or uninstall fail. Then, find Microsoft Visual Studio Installer.In Windows 10 or later, type Add or remove programs in the "Type here to search" box.To remove all installations of Visual Studio 2022, and the Visual Studio Installer from your machine, uninstall it from Installed apps.

If you change your mind later and want to reinstall 2022, start the Visual Studio Installer again, choose the Available tab, choose the edition of Visual Studio that you want to install, and then select Install.

Next, choose More, and then choose Uninstall.

In the installer, look for the edition of Visual Studio that you installed. You might have to update the installer before continuing.

You can also find the Visual Studio Installer in the following location:Ĭ:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe
