Skip to content

Instantly share code, notes, and snippets.

@maximgorbatyuk
Last active August 27, 2025 20:33
Show Gist options
  • Save maximgorbatyuk/e4afb2d8ae6ac85fe32c05964931290f to your computer and use it in GitHub Desktop.
Save maximgorbatyuk/e4afb2d8ae6ac85fe32c05964931290f to your computer and use it in GitHub Desktop.

Revisions

  1. maximgorbatyuk revised this gist Mar 5, 2025. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion remove-dotnet-from-macos.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # How to remove dotnet frpm MacOs
    # How to remove dotnet from MacOs

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

  2. maximgorbatyuk revised this gist Nov 9, 2021. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions remove-dotnet-from-macos.md
    Original file line number Diff line number Diff line change
    @@ -28,3 +28,9 @@ sudo rm -rf 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/`
  3. maximgorbatyuk created this gist Nov 9, 2021.
    30 changes: 30 additions & 0 deletions remove-dotnet-from-macos.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,30 @@
    # 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:

    - download dotnet-uninstall-pkgs.sh from https://github.com/dotnet/sdk/blob/main/scripts/obtain/uninstall/dotnet-uninstall-pkgs.sh
    - make dotnet-uninstall-pkgs.sh executable
    - execute dotnet-uninstall-pkgs.sh as root (requires superuser privileges to run).

    ```
    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
    ```