This post was originally published on Jesse Houwing's blog at Force uninstall Visual Studio 2017 Release candidates.
But when the "uninstall" button in the ui fails, you may end up stuck. In that case, you'll be happy to find:
C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\layout\installcleanup.exe
Which will perform the same actions as the good old "vssetup.exe /uninstall /force". If that doesn't get you unstuck, there is an even more forceful way:
Delete everything under:
C:\Program Files (x86)\Microsoft Visual Studio\2017