Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Completely Uninstalling Xamarin/Visual Studio on a Mac

Building a project on Xamarin.Android (I am using Visual Studio Preview 10 for Mac) just hangs. Even the "Hello World" from Xamarin hangs when compiling. So I tried to reinstall Visual Studio. I used all the steps and the xamarin-uninstall.sh script (from https://developer.xamarin.com/guides/cross-platform/getting_started/installation/uninstalling_xamarin/) But the uninstall was not complete - after re-installing Visual Studio the build still hangs (for the "Hello World" project, not mine).

So the question is how to really completely uninstall all of Visual Studio, Xamarin, Xamarin.Android (including all the emulators), Mono Framework, all build system used by Xamarin/Visual Studio on a Mac.

like image 485
Vassili Avatar asked May 11 '17 11:05

Vassili


People also ask

How do I completely remove Visual Studio from my Mac?

In the Applications tab select Visual Studio. Click the Uninstall button. Confirm the removal. Empty the Trash bin to complete the uninstallation of Visual Studio from your Mac.

Can I remove xamarin?

When removing Xamarin and VisualStudio from the system, all files related to the SDK must also be deleted. To delete all files related to the SDK is to move any file in ~ / Library / Developer / Xamarin / to Trash.


1 Answers

Turns out there are quite a few directories created by a Xamarin/Visual Studio installation that are not even mentioned by the Xamarin folks. Here is a list of directories that I had to remove before compilation worked again (no idea which one was the malicious one):

A few directories in your home directory:

rm -rf ~/.android ~/.mono ~/.nuget ~/.templateengine ~/.oracle_jre_usage ~/.subversion ~/.config ~/.local

And also some other directories:

sudo rm -rf ~/Library/Developer/Xamarin* # for XamarinStudio

sudo rm -rf ~/Library/VisualStudio*

sudo rm -rf ~/Library/Preferences/VisualStudio

sudo rm -rf ~/Library/Preferences/com.microsoft.visual-studio.plist

sudo rm -rf ~/Library/Preferences/com.xamarin.AndroidSdkManager.plist

sudo rm -rf ~/Library/Caches/com.microsoft.visual-studio

sudo rm -rf ~/Library/Caches/com.xamarin*

sudo rm -rf ~/Library/Caches/Xamarin*

sudo rm -rf ~/Library/Caches/VisualStudio*

sudo rm -rf ~/Library/Logs/VisualStudio

sudo rm -rf ~/Library/Preferences/VisualStudio

sudo rm -rf "~/Library/Application\ Support/VisualStudio"/

EDIT:

It's easy by mistake to delete really important stuff. Make sure you keep the certificate file, usually located at:

~/Library/Developer/Xamarin/Keystore/appname/appname.keystore

Otherwise you won't be able to make app updates!

like image 155
Vassili Avatar answered Sep 24 '22 14:09

Vassili