Provided by: dotnet-host-10.0_10.0.7-0ubuntu1~25.10.1_amd64 

dotnet package remove
This article applies to: ✔️ .NET 6 SDK and later versions
NAME
dotnet-package-remove - Removes a package reference from a project file.
If you’re using .NET 9 SDK or earlier, use the “verb first” form (dotnet-remove-package) instead.
The “noun first” form was introduced in .NET 10. For more information, see More consistent com‐
mand order.
SYNOPSIS
dotnet package remove <PACKAGE_NAME>
[--file <FILE>] [--interactive] [--project <PROJECT>]
dotnet package remove -h|--help
DESCRIPTION
The dotnet package remove command provides a convenient option to remove a NuGet package reference from a
project.
ARGUMENTS
PACKAGE_NAME
The package reference to remove.
OPTIONS
• --file <FILE>
The file-based app to operate on.
• --interactive
Allows the command to stop and wait for user input or action. For example, to complete authentication.
• -p|--project <PROJECT>
The project file to operate on. If a solution file is specified, the command will update the package
in all projects in the solution that reference it. If not specified, the command will search the cur‐
rent directory for a project file.
• -?|-h|--help
Prints out a description of how to use the command.
EXAMPLES
• Remove Newtonsoft.Json NuGet package from a project in the current directory:
dotnet package remove Newtonsoft.Json
• Remove Newtonsoft.Json NuGet package from a specific project file:
dotnet package remove Newtonsoft.Json --file MyApp.cs
2025-10-30 dotnet-package-remove(1)