dotnet new uninstall

This article applies to: ✔️ .NET Core 3.1 SDK and later versions

Name

dotnet new --uninstall - uninstalls a template package.

Synopsis

dotnet new --uninstall <PATH|NUGET_ID>

Description

The dotnet new --uninstall command uninstalls a template package at the PATH or NUGET_ID provided. When the <PATH|NUGET_ID> value isn't specified, all currently installed template packages and their associated templates are displayed. When specifying NUGET_ID, don't include the version number.

Note

Starting with .NET SDK 7.0.100 Preview 2, the dotnet new syntax has changed:

  • The --list, --search, --install, and --uninstall options became list, search, install and uninstall subcommands.
  • The --update-apply option became the update subcommand.
  • to use --update-check, use the update subcommand with the --check option.

Other options that were available before are still available to use with their respective subcommands. Separate help for each subcommand is available via the -h or --help option: dotnet new <subcommand> --help lists all supported options for the subcommand.

Additionally, tab completion is now available for dotnet new. It supports completion for installed template names, as well as completion for the options a selected template provides. To activate tab completion for the .NET SDK, see Enable tab completion.

Examples of the new syntax:

  • Show help for the uninstall subcommand.

    dotnet new uninstall --help
    
  • List the installed templates and details about them, including how to uninstall them:

    dotnet new uninstall
    
  • Uninstall the Azure web jobs project template package:

    dotnet new uninstall Microsoft.Azure.WebJobs.ProjectTemplates
    

Examples

  • List the installed templates and details about them, including how to uninstall them:

    dotnet new --uninstall
    
  • Uninstall the SPA templates for ASP.NET Core:

    dotnet new --uninstall Microsoft.DotNet.Web.Spa.ProjectTemplates
    

See also