dotnet tool uninstalldotnet tool uninstall

本文適用於:✓ .NET Core 2.1 SDKThis article applies to: ✓ .NET Core 2.1 SDK

名稱Name

dotnet tool uninstall - 從您的電腦中解除安裝指定的 .NET Core 通用工具dotnet tool uninstall - Uninstalls the specified .NET Core Global Tool from your machine.

概要Synopsis

dotnet tool uninstall <PACKAGE_NAME> <-g|--global>
dotnet tool uninstall <PACKAGE_NAME> <--tool-path>
dotnet tool uninstall <-h|--help>

說明Description

dotnet tool uninstall 命令可讓您從電腦中解除安裝 .NET Core 通用工具。The dotnet tool uninstall command provides a way for you to uninstall .NET Core Global Tools from your machine. 若要使用此命令,您必須使用 --global 選項指定您要移除使用者範圍工具,或使用 --tool-path 選項指定安裝工具的路徑。To use the command, you either have to specify that you want to remove a user-wide tool using the --global option or specify a path to where the tool is installed using the --tool-path option.

引數Arguments

PACKAGE_NAME

包含要解除安裝的 .NET Core 通用工具之 NuGet 套件的名稱/識別碼。Name/ID of the NuGet package that contains the .NET Core Global Tool to uninstall. 您可以使用 dotnet tool list 命令來找到此套件名稱。You can find the package name using the dotnet tool list command.

選項Options

-g|--global

指定要從使用者範圍安裝中移除此工具。Specifies that the tool to be removed is from a user-wide installation. 無法與 --tool-path 選項合併使用。Can't be combined with the --tool-path option. 如果未指定此選項,您必須指定 --tool-path 選項。If you don't specify this option, you must specify the --tool-path option.

-h|--help

印出命令的簡短說明。Prints out a short help for the command.

--tool-path <PATH>

指定要解除安裝通用工具的位置。Specifies the location where to uninstall the Global Tool. PATH 可為絕對路徑或相對路徑。PATH can be absolute or relative. 無法與 --global 選項合併使用。Can't be combined with the --global option. 如果未指定此選項,您必須指定 --global 選項。If you don't specify this option, you must specify the --global option.

範例Examples

解除安裝 dotnetsay 通用工具:Uninstalls the dotnetsay Global Tool:

dotnet tool uninstall -g dotnetsay

從特定的 Windows 資料夾中解除安裝 dotnetsay 通用工具:Uninstalls the dotnetsay Global Tool from a specific Windows folder:

dotnet tool uninstall dotnetsay --tool-path c:\global-tools

從特定的 Linux/macOS 資料夾中解除安裝 dotnetsay 通用工具:Uninstalls the dotnetsay Global Tool from a specific Linux/macOS folder:

dotnet tool uninstall dotnetsay --tool-path ~/bin

另請參閱See also