Skip to content

Instantly share code, notes, and snippets.

@nosami
Forked from jstedfast/uninstall-xamarin.sh
Created October 3, 2019 17:20
Show Gist options
  • Save nosami/71274c98ffe36c3ce6e33c9e7e00aa2b to your computer and use it in GitHub Desktop.
Save nosami/71274c98ffe36c3ce6e33c9e7e00aa2b to your computer and use it in GitHub Desktop.
uninstall-xamarin.sh
#!/bin/bash
echo "Uninstalling the Xamarin Installer..."
rm -rf ~/Library/Caches/XamarinInstaller/
rm -rf ~/Library/Caches/VisualStudioInstaller/
rm -rf ~/Library/Logs/XamarinInstaller/
rm -rf ~/Library/Logs/VisualStudioInstaller/
rm -rf ~/Library/Preferences/Xamarin/
echo "Uninstalling Xamarin.Android..."
sudo rm -rf /Developer/MonoDroid
sudo pkgutil --forget com.xamarin.android.pkg
sudo rm -rf /Library/Frameworks/Xamarin.Android.framework
rm -rf ~/Library/Developer/Xamarin/jdk
rm -rf ~/Library/MonoAndroid
rm -rf ~/Library/Android
rm -rf ~/.android
echo "Uninstalling Xamarin.iOS..."
rm -rf ~/Library/MonoTouch
sudo rm -rf /Library/Frameworks/Xamarin.iOS.framework
sudo rm -rf /Developer/MonoTouch
sudo pkgutil --forget com.xamarin.monotouch.pkg
sudo pkgutil --forget com.xamarin.xamarin-ios-build-host.pkg
sudo pkgutil --forget com.xamarin.xamarin.ios.pkg
echo "Uninstalling Xamarin.Mac..."
sudo rm -rf /Library/Frameworks/Xamarin.Mac.framework
rm -rf ~/Library/Xamarin.Mac
echo "Uninstalling Xamarin Profiler..."
sudo rm -rf "/Applications/Xamarin Profiler.app"
echo "Uninstalling Xamarin Workbooks..."
sudo /Library/Frameworks/Xamarin.Interactive.framework/Versions/Current/uninstall
echo "Uninstalling Visual Studio..."
sudo rm -rf "/Applications/Visual Studio.app"
rm -rf ~/Library/Caches/VisualStudio
rm -rf ~/Library/Preferences/VisualStudio
rm -rf ~/Library/Preferences/Visual\ Studio
rm -rf ~/Library/Logs/VisualStudio
rm -rf ~/Library/VisualStudio
rm -rf ~/Library/Preferences/Xamarin/
rm -rf ~/Library/Developer/Xamarin
rm -rf ~/Library/Application\ Support/VisualStudio
echo "Uninstalling Mono..."
sudo rm -rf /Library/Frameworks/Mono.framework
sudo pkgutil --forget com.xamarin.mono-MDK.pkg
sudo rm /etc/paths.d/mono-commands
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment