Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@maximgorbatyuk
Last active March 28, 2024 15:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maximgorbatyuk/e4afb2d8ae6ac85fe32c05964931290f to your computer and use it in GitHub Desktop.
Save maximgorbatyuk/e4afb2d8ae6ac85fe32c05964931290f to your computer and use it in GitHub Desktop.

How to remove dotnet frpm MacOs

https://github.com/dotnet/cli/blob/rel/1.0.0/scripts/obtain/uninstall/dotnet-uninstall-pkgs.sh

https://stackoverflow.com/a/44089766

To uninstall dotnet core from macOS:

curl -O https://raw.githubusercontent.com/dotnet/sdk/main/scripts/obtain/uninstall/dotnet-uninstall-pkgs.sh
chmod u+x dotnet-uninstall-pkgs.sh
sudo ./dotnet-uninstall-pkgs.sh

OR

https://gist.github.com/sandrovicente/5590f5ac993d9d7fef038fd2858efcc3

# delete the dotnet folder under /usr/local/share/dotnet
cd /usr/local/share/dotnet && ls
sudo rm -rf dotnet

# delete the dotnet reference file at /etc/paths.d/dotnet
cd /etc/paths.d && ls
sudo rm dotnet

What helped me

  1. install dotnet
  2. remove existing dotnet link if exists: cd /usr/local/bin && ls && sudo rm -rf dotnet
  3. create a new link: ln -s /usr/local/share/dotnet/x64/dotnet /usr/local/bin/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment