How can I completely remove the new Microsoft Visual Studio for Mac?

I recently installed Visual Studio for Mac right after it started. It consumed 20 GB of my disk space, so I decided to delete it. I went into the application folder and moved the recently installed installation-related components to the trash. But this did not free up space. So I searched the Internet and followed the following uninstall link: Uninstall Xamarin

After clicking on the link and entering all the terminal commands, I was able to free only 10 GB of memory. How to free the remaining 10 GB of memory?

+4
source share
6 answers

, . OmniDiskSweeper . 16 gb Visual Studio, , . : this

+5

MS VS 20 macOs.

, script, , Mono, NuGet Visual Studio, Mac.

script 20 . "uninstall.sh" "sudo./uninstall.sh" ( , ):

#!/bin/bash
# Complete uninstall Microsoft Visual Studio (Xamarin) including Mono and Microsoft NuGet traces:

# Uninstall Xamarin Studio
rm -rf "/Applications/Xamarin Studio.app"
rm -rf "/Applications/Xamarin Profiler.app"
rm -rf "/Applications/Xamarin Workbooks.app"
rm -rf ~/Library/Caches/XamarinStudio-*
rm -rf ~/Library/Logs/XamarinStudio-*
rm -rf ~/Library/Preferences/XamarinStudio-*
rm -rf ~/Library/XamarinStudio-*
rm -rf ~/Library/Caches/Xamarin
rm -rf ~/Library/Caches/VisualStudio
rm -rf ~/Library/Developer/Xamarin
rm -rf ~/Library/Developer/XamarinStudio
rm -rf ~/Library/Developer/VisualStudio
rm -rf ~/Library/Logs/Xamarin
rm -rf ~/Library/Logs/VisualStudio
rm -rf ~/Library/Preferences/Xamarin
rm -rf ~/Library/Preferences/VisualStudio
rm -rf ~/Library/Xamarin
rm -rf ~/Library/MonoAndroid
rm -rf ~/Library/XamarinStudio-*
rm -rf ~/Library/VisualStudio
rm -rf ~/Library/Application\ Support/XamarinStudio-*
rm -rf ~/Library/Application\ Support/VisualStudio
rm -rf ~/.templateengine/Visual\ Studio
rm -rf ~/.share/Xamarin
rm -rf ~/.local/share/Xamarin

sudo rm -f /private/var/db/receipts/com.xamarin.*
sudo rm -f /private/var/db/receipts/xamarin.*

# Uninstall Mono MDK
# You will also want to make sure that there are no other dependencies on Mono
sudo rm -rf /Library/Frameworks/Mono.framework
sudo pkgutil --forget com.xamarin.mono-MDK.pkg
rm -rf ~/.local/share/MonoForAndroid
rm -rf ~/.config/.mono
rm -rf ~/.android

# Uninstall Xamarin.Android
sudo rm -rf /Developer/MonoDroid
sudo rm -rf /Library/Frameworks/Xamarin.Android.framework
sudo pkgutil --forget com.xamarin.android.pkg
rm -rf ~/Library/MonoAndroid

# Uninstall Xamarin.iOS
rm -rf ~/Library/MonoTouch
sudo rm -rf /Library/Frameworks/Xamarin.iOS.framework
sudo rm -rf /Developer/MonoTouch
sudo rm -rf /Developer/MonoAndroid
sudo pkgutil --forget com.xamarin.monotouch.pkg
sudo pkgutil --forget com.xamarin.xamarin-ios-build-host.pkg

## To Uninstall the Xamarin Build Host
 sudo rm -rf "/Applications/Xamarin.iOS Build Host.app"

## To unload and remove the Xamarin Build Host launchd job
 launchctl unload /Library/LaunchAgents/com.xamarin.mtvs.buildserver.plist
sudo rm -f /Library/LaunchAgents/com.xamarin.mtvs.buildserver.plist

# Uninstall Xamarin.Mac
sudo rm -rf /Library/Frameworks/Xamarin.Mac.framework
rm -rf ~/Library/Xamarin.Mac
sudo rm -rf /Library/Frameworks/Xamarin.Interactive.framework

# Uninstall Xamarin Installer
rm -rf ~/Library/Caches/XamarinInstaller/
rm -rf ~/Library/Logs/XamarinInstaller/
rm -rf ~/Library/Preferences/Xamarin/

# Uninstall Microsoft NuGet
rm -rf ~/.local/share/NuGet
rm -rf ~/.config/NuGet
rm -rf ~/.config/.NuGet
rm -rf ~/.NuGet

# Uninstall traces of visual studio code
rm -rf ~/.vscode
+12

, , , . , ~/Library/Logs/XamarinInstaller/Universal Sandys John Smith /Frameworks . 14 , .

, , , , VS Mac . ( )

~/Library/ /

~/Library/Preferences

~/Library/

~/Library/Logs/

//MonoAndroid

+2

Visual Studio Mac:

1)

rm -R "/Applications/Visual Studio.app"

2), , Microsoft NuGet

rm -R "./.nuget"

3)

find . -type d \( -path /{{some_excluded_path}} -o -path /{{some_excluded_path}} -o -path /{{some_excluded_path}} \) -prune -o -print | grep "xamarin"
find . -type d \( -path /{{some_excluded_path}} -o -path /{{some_excluded_path}} -o -path /{{some_excluded_path}} \) -prune -o -print | grep "visual studio"

, .

+1

Microsoft has provided a guide to uninstall VS for Mac here: https://docs.microsoft.com/en-us/visualstudio/mac/uninstall

For example, to remove all traces of Visual Studio for Mac, you can run the following commands:

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/VisualLodStudio
+1
source

Source: https://habr.com/ru/post/1661755/


All Articles