Security Updates for Microsoft .NET Core (166054) - How do I uninstall older versions of .Net Core

Andrew Porter 1 Reputation point
2023-02-01T17:18:26.21+00:00

Hi,

I am getting multiple vulnerabilities show for machines having older versions of .Net Core installed. I have checked the machines and they do have the old versions in the folder C:\Program Files\dotnet\shared\Microsoft.NETCore.App\versionnumber.

If I log onto the machine the old versions do not exist in programs and features and they also do not exist if I run the .NET Core Uninstall Tool and the comamnd dotnet-core-uninstall list it does not list the old versions.

How can I uninstall the old versions and why do they no show up in either the Uninstall tool on programs and features? Can I just delete the folders?

References

Thanks

Visual Studio Setup
Visual Studio Setup
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
1,050 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Tianyu Sun-MSFT 31,246 Reputation points Microsoft Vendor
    2023-02-02T06:53:14.8866667+00:00

    Hi Andrew Porter,

    Welcome to Microsoft Q&A forum.

    If I log onto the machine the old versions do not exist… and they also do not exist…

    It seems that there are multiple accounts. Have you tried to log onto the machine with the administrator account and check if the old versions of .NET exist?

    Not all of the installed .NET can be uninstalled by using the .NET uninstall tool:

    On Windows, the tool can only uninstall SDKs and runtimes that were installed using one of the following installers:

    The . NET SDK and runtime installer.

    The Visual Studio installer in versions earlier than Visual Studio 2019 version 16.3.

    It is not recommended to just delete the folders. It’s better to use the suggested methods here: How to remove the .NET Runtime and SDK. Please firstly check if .NTE exists when you use different accounts to log onto your machine.

    Feel free to contact us.

    Best Regards,

    Tianyu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

  2. Andrew Porter 0 Reputation points
    2023-02-03T17:02:36.84+00:00

    Thanks, I will give those ideas a go

    0 comments No comments

  3. Andrew Porter 0 Reputation points
    2023-02-06T12:05:53.8933333+00:00

    I've tested on one device and if I run dotnet-core-uninstall list then it does not list any old versions. If I run dotnet --list-runtimes then it lists a bunch of old versions. What is the donet --list-runtimes command showing - is this all the versions installed or just all the versions that have folders? *I've done this logging as with the admin account as well as a normal account. If donet --list-runtimes does list versions installed how can I uninstall them when the uninstall doesn't and they don't show in programs and features?

    dotnet


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.