There are a number of Xamarin products that enable cross-platform application development, including stand-alone apps like Visual Studio for Mac.
You can use this guide to uninstall each product individually by navigating to the relevant section, or you can use the scripts provided in the Uninstall Script section to uninstall everything.
If you have previously had Xamarin Studio installed on your machine, you may also need to follow the instructions in Xamarin's uninstall guide, in addition to the following steps.
Uninstall Script
There are two scripts that can be used to uninstall Visual Studio for Mac and all components for your machine:
The following sections provide information on downloading and using the scripts.
Visual Studio for Mac and Xamarin script
You can uninstall Visual Studio and Xamarin components in one go by using the uninstall script.
This uninstall script contains most of the commands that you will find in the article. There are three main omissions from the script and are not included due to possible external dependencies. To remove this, jump to the relevant section below and remove them manually:
The first step in uninstalling Visual Studio from a Mac is to locate Visual Studio.app in the /Applications directory and drag it to the Trash Can. Alternatively, right-click and select Move to Trash as illustrated in the following image:
Deleting this app bundle removes Visual Studio for Mac, even though there may be other files related to Xamarin still on the file system.
To remove all traces of Visual Studio for Mac, run the following commands in Terminal:
You may also want to remove the following directory containing various Xamarin files and folders. However, before you do you should be aware that this directory contains the Android signing keys. For more information refer to the section Uninstalling Android SDK and Java SDK:
bash
rm -rf ~/Library/Developer/Xamarin
Uninstall Mono SDK (MDK)
Mono is an open-source implementation of Microsoft's .NET Framework and is used by all Xamarin Products—Xamarin.iOS, Xamarin.Android, and Xamarin.Mac to allow development of these platforms in C#.
Warning
There are other applications outside of Visual Studio for Mac that also use Mono, such as Unity. Be sure that there are no other dependencies on Mono before uninstalling it.
To remove the Mono Framework from a machine, run the following commands in Terminal:
The Android SDK is required for development of Android applications. To completely remove all parts of the Android SDK, locate the file at ~/Library/Developer/Xamarin/ and move it to Trash.
Warning
You should be aware that Android signing keys that are generated by Visual Studio for Mac are located in ~/Library/Developer/Xamarin/Keystore. Make sure to back these up appropriately, or avoid removing this directory if you wish to keep your keystore.
The Java SDK (JDK) does not need to be uninstalled, as it is already pre-packaged as part of Mac OS X / macOS.
Uninstall Android AVD
Warning
There are other applications outside of Visual Studio for Mac that also use Android AVD and these additional android components, such as Android Studio.Removing this directory may cause projects to break in Android Studio.
To remove any Android AVDs and additional Android components use the following command:
bash
rm -rf ~/.android
To remove only the Android AVDs use the following command:
bash
rm -rf ~/.android/avd
Uninstall Xamarin.iOS
Xamarin.iOS allows iOS application development using C# or F# with Visual Studio for Mac.
Use the following commands in Terminal to remove all Xamarin.iOS files from a file system:
For older versions, you need to manually remove the following artifacts:
Delete the Workbooks app at "/Applications/Xamarin Workbooks.app"
Delete the Inspector app at "Applications/Xamarin Inspector.app"
Delete the add-ins: "~/Library/Application Support/XamarinStudio-6.0/LocalInstall/Addins/Xamarin.Interactive" and "~/Library/Application Support/XamarinStudio-6.0/LocalInstall/Addins/Xamarin.Inspector"
Delete Inspector and supporting files here: /Library/Frameworks/Xamarin.Interactive.framework and /Library/Frameworks/Xamarin.Inspector.framework
Uninstall the Xamarin Profiler
bash
sudo rm -rf "/Applications/Xamarin Profiler.app"
Uninstall the Visual Studio Installer
Use the following commands to remove all traces of the Xamarin Universal Installer: