IT Nota

  • Home
  • How To
  • .NET
  • WordPress
  • Contact

How to Remove .NET Runtime and SDK on Mac

Check Installation

Determine which version is installed with the command line.

According to Microsoft documentation, we need to remove the SDKs and runtimes separately:

Pay attention to the difference in installed locations between the Intel Mac vs. Silicon M series chip.

Arm-based mac: /usr/local/share/dotnet/
Intel-based mac: /usr/local/share/dotnet/x64/dotnet/

In this example, I want to remove the .NET 6 RC on an M1 silicon Mac from previous test.

% dotnet --list-runtimes
Microsoft.AspNetCore.App 6.0.0-rc.1.21452.15 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.0-rc.1.21451.13 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

% dotnet --list-sdks
6.0.100-rc.1.21463.6 [/usr/local/share/dotnet/sdk]

Uninstall .NET

From the example above, we’ll remove all instances. All these commands can be entered all at once in the Terminal, it will ask you to enter sudo password just once.

sudo rm -rf /usr/local/share/dotnet/sdk/$version
sudo rm -rf /usr/local/share/dotnet/shared/Microsoft.NETCore.App/$version
sudo rm -rf /usr/local/dotnet/shared/Microsoft.AspNetCore.All/$version
sudo rm -rf /usr/local/share/dotnet/shared/Microsoft.AspNetCore.App/$version
sudo rm -rf /usr/local/share/dotnet/host/fxr/$version

That’s it.

You can re-run the dotnet –list-runtimes and dotnet –list-sdks to verify that there’s no longer any .NET installed. You should see something similar to this:

% dotnet --list-runtimes                          
A fatal error occurred. The folder [/usr/local/share/dotnet/host/fxr] does not exist

% dotnet --list-sdks
A fatal error occurred. The folder [/usr/local/share/dotnet/host/fxr] does not exist

Now you can install the new version for your .NET development.

Further Reading

How to remove the .NET Runtime and SDK
How to Check Installed .NET Core Version
Trying .NET 6 Preview on macOS Silicon M1

March 15, 2022 Filed Under: How To Tagged With: .NET, macOS, Microsoft

Buy me a coffee?

Buy me a coffee If you find any of the articles or demos helpful, please consider supporting my work here, you'll have my big thanks!

Buy me a coffee Support this site
Buy Me a Coffee?

Categories

  • .NET
  • Coding
  • Cybersecurity
  • Database
  • How To
  • Internet
  • Multimedia
  • Photography
  • Programming
  • Resources
  • Review
  • Tips and Tricks
  • Uncategorized
  • Use Case
  • WordPress
  • Writing

Recent Posts

  • How to View Stored Procedure Code in SQL Server
  • How to Find a String in SQL Server Stored Procedures
  • How to Remove Cached Credentials without Rebooting Windows
  • ESP Work Automation: Empowering Enterprises with Streamlined Workflows and Operational Efficiency
  • How to Search for a String in All Tables in a Database

Recent Posts

  • How to View Stored Procedure Code in SQL Server
  • How to Find a String in SQL Server Stored Procedures
  • How to Remove Cached Credentials without Rebooting Windows
  • ESP Work Automation: Empowering Enterprises with Streamlined Workflows and Operational Efficiency
  • How to Search for a String in All Tables in a Database

Tags

.NET .NET Core AdSense ASP.NET Cdonts Dll Classic ASP Code Editor ETL FSharp Genesis Framework Git Google HP Asset Manager HTML5 Hugo IIS Information Security Internet Internet Information Services iOS JAMStack Linux macOS Microsoft Microsoft SQL Server MVC PHP PowerShell Python Simple Mail Transfer Protocol Smtp Server SQL SQL Server SSIS SSMS SSRS Sublime Text Visual Studio Visual Studio Code VPN Windows Windows 8 Windows 10 Windows 2012 Windows Server

Copyright © 2011-2025 IT Nota. All rights reserved. Terms of Use | Privacy Policy | Disclosure