Skip to content

Instantly share code, notes, and snippets.

@justinyoo
Last active October 10, 2025 20:56
Show Gist options
  • Select an option

  • Save justinyoo/68c11fa00480fa15d38f7288815c6ba5 to your computer and use it in GitHub Desktop.

Select an option

Save justinyoo/68c11fa00480fa15d38f7288815c6ba5 to your computer and use it in GitHub Desktop.

Revisions

  1. justinyoo renamed this gist Nov 20, 2021. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. justinyoo created this gist Nov 20, 2021.
    4 changes: 4 additions & 0 deletions 01-remove-sdk-sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    sdkVersion="6.0.100"

    sudo rm -rf /usr/local/share/dotnet/sdk/$sdkVersion
    sudo rm -rf /usr/local/share/dotnet/sdk-manifests/$sdkVersion
    11 changes: 11 additions & 0 deletions 02-remove-runtime.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    runtimeVersion="6.0.0"

    sudo rm -rf /usr/local/share/dotnet/host/fxr/$runtimeVersion
    sudo rm -rf /usr/local/share/dotnet/packs/Microsoft.AspNetCore.App.Ref/$runtimeVersion
    sudo rm -rf /usr/local/share/dotnet/packs/Microsoft.NETCore.App.Host.osx-x64/$runtimeVersion
    sudo rm -rf /usr/local/share/dotnet/packs/Microsoft.NETCore.App.Ref/$runtimeVersion
    sudo rm -rf /usr/local/share/dotnet/packs/NETStandard.Library.Ref/$runtimeVersion
    sudo rm -rf /usr/local/share/dotnet/shared/Microsoft.AspNetCore.All/$runtimeVersion
    sudo rm -rf /usr/local/share/dotnet/shared/Microsoft.AspNetCore.App/$runtimeVersion
    sudo rm -rf /usr/local/share/dotnet/shared/Microsoft.NETCore.App/$runtimeVersion
    sudo rm -rf /usr/local/share/dotnet/templates/$runtimeVersion
    13 changes: 13 additions & 0 deletions 03-remove-both.ps1
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    $sdkVersion="6.0.100"
    $runtimeVersion="6.0.0"

    $sdkPaths = Get-ChildItem -Path /usr/local/share/dotnet/ -Include $sdkVersion -Directory -Recurse
    $runtimePaths = Get-ChildItem -Path /usr/local/share/dotnet/ -Include $runtimeVersion -Directory -Recurse

    $sdkPaths | ForEach-Object {
    sudo rm -rf $_.FullName
    }

    $runtimePaths | ForEach-Object {
    sudo rm -rf $_.FullName
    }