dotnet-tool-update(1)

πŸ“¦
version 11.0.0~rc3 Β· 6 versions
, in alpine 3.24, centos-stream 10, centos-stream 9, fedora 43, fedora 44, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ NAME ✨

dotnet-tool-update β€” Updates the specified .NET tool on your machine. πŸ’…

That's the whole vibe. One tool, freshly updated, no cap.

This article applies to: βœ”οΈ .NET 6 SDK and later versions

Oh and pookie, this is dotnet-tool-update(1) from the .NET Documentation set, so you know it's official official. πŸŽ€


🌸 SYNOPSIS 🌸

       dotnet tool update <PACKAGE_ID> -g|--global
           [--add-source <SOURCE>] [--all] [--allow-downgrade]
           [--configfile <FILE>]
           [--disable-parallel] [--framework <FRAMEWORK>]
           [--ignore-failed-sources] [--interactive]
           [--no-cache] [--prerelease]
           [-v|--verbosity <LEVEL>] [--version <VERSION>]

       dotnet tool update <PACKAGE_ID> --tool-path <PATH>
           [--add-source <SOURCE>] [--all] [--allow-downgrade]
           [--configfile <FILE>]
           [--disable-parallel] [--framework <FRAMEWORK>]
           [--ignore-failed-sources] [--interactive]
           [--no-cache] [--prerelease]
           [-v|--verbosity <LEVEL>] [--version <VERSION>]

       dotnet tool update <PACKAGE_ID> --local
           [--add-source <SOURCE>] [--all] [--allow-downgrade]
           [--configfile <FILE>]
           [--disable-parallel] [--framework <FRAMEWORK>]
           [--ignore-failed-sources] [--interactive]
           [--no-cache] [--prerelease]
           [--tool-manifest <PATH>]
           [-v|--verbosity <LEVEL>] [--version <VERSION>]

       dotnet tool update -h|--help

πŸ’– DESCRIPTION πŸ’–

Okay so bestie, dotnet tool update is literally your tool's glow-up appointment. ✨ It gives you a way to update .NET tools on your machine to the latest stable version of the package. The way it works is kinda dramatic: it uninstalls and reinstalls a tool, which effectively updates it. Main character energy, honestly.

To use the command, you specify one of these options:

  • To update a global tool that was installed in the default location, use the --global option πŸ‘‘
  • To update a global tool that was installed in a custom location, use the --tool-path option πŸ¦‹
  • To update a local tool, use the --local option 🌸

πŸŽ€ ARGUMENTS πŸŽ€

  • PACKAGE_ID

Name/ID of the NuGet package that contains the .NET global tool to update. Not sure what it's called? You can find the package name using the dotnet tool list command. iykyk 🫢


πŸ‘‘ OPTIONS πŸ‘‘

  • --add-source <SOURCE> β€” Adds an additional NuGet package source to use during installation. Heads up though: feeds are accessed in parallel, not sequentially in some order of precedence. So if the same package and version lives in multiple feeds, the fastest feed wins. Race condition but make it ✨fashion✨. For more information, see What happens when a NuGet package is installed?.
  • --all β€” Update all tools. Every single one. Periodt.
  • --allow-downgrade β€” Allow package downgrade when installing or updating a .NET tool package. This suppresses the warning, β€œThe requested version x.x.x is lower than existing version x.x.x.” Going backwards, on purpose, unbothered. πŸ’…
  • --configfile <FILE> β€” The NuGet configuration file (nuget.config) to use. If specified, only the settings from this file will be used β€” no mixing, no blending. If not specified, the hierarchy of configuration files from the current directory will be used. For more information, see Common NuGet Configurations.
  • --disable-parallel β€” Prevent restoring multiple projects in parallel. One at a time, we're being calm today. 🧘
  • --framework <FRAMEWORK> β€” Specifies the target framework to update the tool for.
  • -g|--global β€” Specifies that the update is for a user-wide tool. Can’t be combined with the --tool-path option β€” pick a lane bestie. Omitting both --global and --tool-path specifies that the tool to be updated is a local tool.
  • -?|-h|--help β€” Prints out a description of how to use the command. When in doubt, ask for help, that's self-care. πŸ™ˆ
  • --ignore-failed-sources β€” Treat package source failures as warnings. Failed source? Not a crisis, just a lil note. 😌
  • --interactive β€” Allows the command to stop and wait for user input or action. For example, to complete authentication. It'll just sit there patiently waiting for you, like a good friend. 🫢
  • --local β€” Update the tool and the local tool manifest. Can’t be combined with the --global option or the --tool-path option.
  • --no-cache β€” Do not cache packages and HTTP requests. Fresh every time, no leftovers. πŸ“
  • --prerelease β€” Include prerelease versions. Living on the edge, we respect it. πŸ”₯
  • --tool-manifest <PATH> β€” Path to the manifest file.
  • --tool-path <PATH> β€” Specifies the location where the global tool is installed. PATH can be absolute or relative. Can’t be combined with the --global option. Omitting both --global and --tool-path specifies that the tool to be updated is a local tool.
  • -v|--verbosity <LEVEL> β€” Sets the verbosity level of the command. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]. For more information, see <xref:Microsoft.Build.Framework.LoggerVerbosity>. (Yes the shorthand in brackets is legit, you can type q or quiet, either eats. πŸ’…)
  • --version <VERSION> β€” The version range of the tool package to update to. ⚠️ This cannot be used to downgrade versions, you must uninstall newer versions first. No sneaky backwards sliding.

Starting in .NET 8.0, --version Major.Minor.Patch refers to a specific major.minor.patch version, including unlisted versions. To get the latest version of a certain major.minor version instead, use --version Major.Minor.*.


🌈 EXAMPLES 🌈

  1. dotnet tool update -g dotnetsay

Updates the dotnetsay (https://www.nuget.org/packages/dotnetsay/) global tool.

  1. dotnet tool update dotnetsay --tool-path c:\global-tools

Updates the dotnetsay (https://www.nuget.org/packages/dotnetsay/) global tool located in a specific Windows directory. πŸͺŸ

  1. dotnet tool update dotnetsay --tool-path ~/bin

Updates the dotnetsay (https://www.nuget.org/packages/dotnetsay/) global tool located in a specific Linux/macOS directory. 🐧🍎

  1. dotnet tool update dotnetsay

Updates the dotnetsay (https://www.nuget.org/packages/dotnetsay/) local tool installed for the current directory.

  1. dotnet tool update -g dotnetsay --version 2.0.*

Updates the dotnetsay (https://www.nuget.org/packages/dotnetsay/) global tool to the latest patch version, with a major version of 2, and a minor version of 0.

  1. dotnet tool update -g dotnetsay --version (2.0.*,2.1.4)

Updates the dotnetsay (https://www.nuget.org/packages/dotnetsay/) global tool to the lowest version within the specified range (> 2.0.0 && < 2.1.4), version 2.1.0 would be installed. For more information on semantic versioning ranges, see NuGet packaging version ranges.


πŸ¦‹ SEE ALSO πŸ¦‹

  • .NET tools
  • Semantic versioning (https://semver.org)
  • Tutorial: Install and use a .NET global tool using the .NET CLI
  • Tutorial: Install and use a .NET local tool using the .NET CLI

And that's the whole page, bestie β€” go forth and update something. 🌟

This was dotnet-tool-update(1) straight from the .NET Documentation crew, dated 2025-10-30. Slay, bye! πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from