Apps · free up space

How to uninstall Visual Studio for Mac

Quit Visual Studio, download Microsoft's uninstall-vsmac.sh script and run it with sudo in Terminal: it removes the app, its caches, logs and preferences, and the Xamarin frameworks. It leaves Mono, the Android SDK and the Android emulators on purpose, because other apps may use them, and .NET has a script of its own. Back up your Android signing keys before removing the Xamarin folder.

Microsoft retired Visual Studio for Mac on 31 August 2024. Microsoft says you can keep working with it, and its uninstall page suggests other options for C# on a Mac, such as the C# Dev Kit extension for Visual Studio Code. Uninstalling it properly takes more than the Trash, because it installs frameworks and SDKs outside the app.

Where Visual Studio for Mac keeps its files

Microsoft's uninstall page lists them in four groups. The app is the smallest part of it:

  • The app: /Applications/Visual Studio.app, and Visual Studio (Preview).app if you ran the preview.
  • Its own data in your Library: ~/Library/Caches/VisualStudio, ~/Library/Logs/VisualStudio, ~/Library/VisualStudio, ~/Library/Application Support/VisualStudio, and preferences in ~/Library/Preferences/VisualStudio, Visual Studio and Xamarin.
  • The Xamarin frameworks: Xamarin.iOS, Xamarin.Android and Xamarin.Mac in /Library/Frameworks, with more in /Developer/MonoTouch, /Developer/MonoDroid, ~/Library/MonoTouch and ~/Library/MonoAndroid.
  • Shared tools: Mono in /Library/Frameworks/Mono.framework, the Android SDK in ~/Library/Developer/Xamarin, Android emulators in ~/.android, and the .NET SDK.

Measure it first

This reads sizes and deletes nothing. A line for a folder means it is there; a folder that is missing is skipped without a message:

du -sh "/Applications/Visual Studio.app" ~/Library/Caches/VisualStudio ~/Library/Logs/VisualStudio ~/Library/VisualStudio ~/Library/Application\ Support/VisualStudio ~/Library/Developer/Xamarin /Library/Frameworks/Mono.framework ~/.android 2>/dev/null

The Android SDK and emulators are usually the largest lines, and they are also the ones other apps may be using, which is why the next section treats them separately.

What to keep before you start

  • Your Android signing keys. Microsoft warns that the keys Visual Studio for Mac generated are in ~/Library/Developer/Xamarin/Keystore. Without the key you may not be able to update an Android app you have published, so copy that folder somewhere safe, or leave ~/Library/Developer/Xamarin in place.
  • Mono, if another app uses it. Microsoft names Unity as one. Check before removing it.
  • ~/.android, if you use Android Studio. Microsoft warns that removing it can break Android Studio projects. To remove only the emulators, delete ~/.android/avd instead.
  • Your projects. None of the steps here touch your solution folders, wherever you keep them.

Uninstall with Microsoft's script

Microsoft recommends its script, which runs most of the commands on its uninstall page in one go. Quit Visual Studio first, then:

  1. Open Microsoft's Uninstall Visual Studio for Mac page and save the uninstall-vsmac.sh script it links to.
  2. Open Terminal, move to the folder you saved it in, make it executable and run it with sudo. For a script saved in Downloads:
cd ~/Downloads
chmod +x ./uninstall-vsmac.sh
sudo ./uninstall-vsmac.sh

It asks for your administrator password, because the app and the frameworks belong to the system. Then delete the script, and remove Visual Studio from the Dock if it is still there.

The script deletes with rm -rf, so nothing goes to the Trash and nothing can be put back. It removes the app, its caches, logs and preferences, the Xamarin.iOS, Xamarin.Android and Xamarin.Mac frameworks, Workbooks and Inspector, the Xamarin Profiler and the installer's own caches and logs. Microsoft leaves three things out of it on purpose, because other software may depend on them: Mono, the Android emulators, and the Android SDK.

.NET, Mono and Android: the parts the script leaves

.NET has its own script, dotnet-uninstall-pkgs.sh, also linked from Microsoft's page. It removes .NET for everything on the Mac, so skip it if you still build .NET projects with another editor. Otherwise save it and run it the same way:

chmod +x ./dotnet-uninstall-pkgs.sh
sudo ./dotnet-uninstall-pkgs.sh

Mono, once you know nothing else needs it, comes out with Microsoft's three commands:

sudo rm -rf /Library/Frameworks/Mono.framework
sudo pkgutil --forget com.xamarin.mono-MDK.pkg
sudo rm -rf /etc/paths.d/mono-commands

The Android SDK is the ~/Library/Developer/Xamarin folder: Microsoft's advice is to move it to the Trash, once the Keystore folder inside it is backed up. The emulators are in ~/.android/avd.

By hand, without the script

Microsoft's page also lists every command separately, for anyone who would rather run them one at a time. Drag Visual Studio from Applications to the Trash, then remove its own folders:

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/Application\ Support/VisualStudio

The Xamarin frameworks each have their own section on that page, with the sudo rm -rf and pkgutil --forget lines for each. For the folders in your own Library there is a gentler way: in Finder, press Shift-Command-G, paste the path without rm -rf, and drag the folder to the Trash, where it stays until you empty it.

Checking it has gone

ls -d "/Applications/Visual Studio.app" ~/Library/VisualStudio /Library/Frameworks/Mono.framework /Library/Frameworks/Xamarin.iOS.framework 2>/dev/null

Any path it prints is still there. No output means the app, its Library folder, Mono and Xamarin.iOS are all gone. Nothing grows back afterwards: with the app removed, nothing writes to those folders again, apart from ~/.android if Android Studio is still installed.

Where the app comes in

Atzuno Safe Data Cleaner has no Visual Studio, Xamarin or Mono category, so the uninstall itself is Microsoft's script. What it does cover: Application Caches, everything in ~/Library/Caches, and System & App Logs, your own logs in ~/Library/Logs, are both rated Safe for auto removal, so Visual Studio's cache and log folders are counted there. In the download edition, Android Emulators lists each emulator's disk image in ~/.android/avd and is rated Review before deleting, and Unused Applications lists apps you haven't opened recently, largest first, and moves them to the Trash. Application Support is shown for its size only: the app never deletes from it.

Uninstall an App, also in the download edition and described in how to uninstall apps on a Mac, finds an app's pieces by its bundle ID and by its exact name. Visual Studio's folders are named VisualStudio, without the space, and Xamarin and Mono are named after themselves, so they stay on Microsoft's list. For what other developer tools leave behind, see the Mac cleaner for developers and the leftover files after uninstalling an app.

What to do next: see these numbers for your own Mac. Download Atzuno Safe Data Cleaner free, or get it on the Mac App Store.

What it costs to have an app do this

Atzuno Safe Data CleanerCleanMyMacMacKeeper
Pay once$24.99 $12.49 until 6 December€119.95 on MacPaw’s store; $89.99 for CleanMyMac X on the Mac App Storesubscription only
Yearly$14.99 a year, first 7 days free$39.99/yr on the Mac App Store; €39.95/yr on MacPaw’s store€71.40 for the first year, 1 Mac. Their page shows it against a €119.40 list price
MonthlyNo$9.99/mo€10.95/mo
Account neededNoYesYes

Lowest price in the 30 days before the sale: $14.99 (launch offer, ended 2 Nov). Both versions' yearly plans start with 7 days free. CleanMyMac and MacKeeper prices read from their own pages and the Mac App Store on 27 October 2026; the full comparison is at Atzuno Safe Data Cleaner vs CleanMyMac and MacKeeper.

Frequently asked questions

How do I completely uninstall Visual Studio for Mac?

Quit Visual Studio, save Microsoft’s uninstall-vsmac.sh script from its Uninstall Visual Studio for Mac page, then run it with sudo in Terminal. It removes the app, its caches, logs and preferences, and the Xamarin frameworks. Mono, the Android SDK, the Android emulators and .NET are removed separately.

Is Visual Studio for Mac still supported?

No. Its retirement date was 31 August 2024, under Microsoft’s Modern Lifecycle Policy. Microsoft says you can keep working with it, and suggests other options such as the C# Dev Kit extension for Visual Studio Code.

Will uninstalling Visual Studio for Mac delete my Android signing keys?

Microsoft’s script leaves the Android SDK folder, ~/Library/Developer/Xamarin, where the keys are kept in the Keystore folder. If you remove that folder by hand, back up the Keystore folder first.