dotnet tool uninstall

本文適用於: ✔️ .NET Core 3.1 SDK 與更新版本

名稱

dotnet tool uninstall - 從您的電腦中解除安裝指定的 .NET 工具

概要

dotnet tool uninstall <PACKAGE_NAME> -g|--global

dotnet tool uninstall <PACKAGE_NAME> --tool-path <PATH> [--tool-manifest <PATH>]

dotnet tool uninstall <PACKAGE_NAME>

dotnet tool uninstall -h|--help

描述

dotnet tool uninstall 命令是解除安裝電腦中 .NET 工具的方式。 若要使用此命令,請指定下列其中一個選項:

  • 若要解除安裝已安裝在預設位置的全域工具,請使用 --global 選項。
  • 若要解除安裝已安裝在自訂位置的全域工具,請使用 --tool-path 選項。
  • 若要解除安裝本機工具,請省略 --global--tool-path 選項。

引數

  • PACKAGE_NAME

    包含要解除安裝的 .NET 工具的 NuGet 套件之名稱/識別碼。 您可以使用 dotnet tool list 命令來找到此套件名稱。

選項。

  • -g|--global

    指定要從使用者範圍安裝中移除此工具。 無法與 --tool-path 選項合併使用。 省略 --global--tool-path 會將要移除的工具指定為本機工具。

  • -?|-h|--help

    列印如何使用命令的描述。

  • --tool-path <PATH>

    指定要解除安裝工具的位置。 PATH 可為絕對路徑或相對路徑。 無法與 --global 選項合併使用。 省略 --global--tool-path 會將要移除的工具指定為本機工具。

  • --tool-manifest <PATH>

    指定要從中移除工具的指令清單檔。 PATH 可為絕對路徑或相對路徑。 無法與 --global 選項合併使用。

範例

  • dotnet tool uninstall -g dotnetsay

    解除安裝 dotnetsay 全域工具。

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

    解除安裝特定 Windows 目錄中的 dotnetsay 全域工具。

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

    解除安裝特定 Linux/macOS 目錄中的 dotnetsay 全域工具。

  • dotnet tool uninstall dotnetsay

    解除安裝當前目錄中的 dotnetsay 本機工具。

另請參閱