winget-cli

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

upgrade.md (7757B)


      1 ---
      2 title: upgrade Command
      3 description: upgrades the specified application.
      4 ms.date: 05/05/2021
      5 ms.topic: overview
      6 ms.localizationpriority: medium
      7 ---
      8 
      9 # upgrade command (winget)
     10 
     11 The **upgrade** command of the [winget](index.md) tool upgrades the specified application. Optionally, you may not specify an application, this will list all available upgrades instead.
     12 
     13 The **upgrade** command requires that you specify the exact string to upgrade. If there is any ambiguity, you will be prompted to further filter the **upgrade** command to  an exact application.
     14 
     15 ## Usage
     16 
     17 `winget upgrade [[-q] <query>...] [<options>]`
     18 
     19 The following command aliases are available: \
     20 `update`
     21 
     22 ![upgrade command](images/upgrade.png)
     23 
     24 ## Options
     25 
     26 The options allow you to customize the upgrade experience to meet your needs.
     27 
     28 | Option                            | Description                                                                                                                  |
     29 |-----------------------------------|------------------------------------------------------------------------------------------------------------------------------|
     30 | **-m, --manifest**                | Must be followed by the path to the manifest (YAML) file. You can use the manifest to run the upgrade experience from a [local YAML file](#local-upgrade). |
     31 | **--id**                          | Limits the upgrade to the ID of the application.                                                                             |
     32 | **--name**                        | Limits the search to the name of the application.                                                                           |
     33 | **--moniker**                     | Limits the search to the moniker listed for the application.                                                                |
     34 | **-v, --version**                 | Enables you to specify an exact version to upgrade. If not specified, the latest will upgrade the highest versioned application. |
     35 | **-s, --source**                  | Restricts the search to the source name provided. Must be followed by the source name.                                      |
     36 | **-e, --exact**                   | Uses the exact string in the query, including checking for case-sensitivity. It will not use the default behavior of a substring. |
     37 | **-i, --interactive**             | Runs the installer in interactive mode. The default experience shows installer progress.                                      |
     38 | **-h, --silent**                  | Runs the installer in silent mode. This suppresses all UI. The default experience shows installer progress.                 |
     39 | **-o, --log**                     | Directs the logging to a log file. You must provide a path to a file that you have the write rights to.                      |
     40 | **--override**                    | A string that will be passed directly to the installer.                                                                     |
     41 | **-l, --location**                | Location to upgrade to (if supported).                                                                                     |
     42 | **--force**                       | When a hash mismatch is discovered will ignore the error and attempt to install the package.                                |
     43 | **--all**                         | Updates all available packages to the latest application.                                                                  |
     44 | **--include-unknown**            | Attempt to upgrade a package even if the package's current version is unknown.                                              |
     45 | **--purge**                       | Deletes all files and directories in the package directory (portable).                                                      |
     46 | **--custom**                      | Arguments to be passed on to the installer in addition to the defaults.                                                     |
     47 | **--scope**                       | Select installed package scope filter (user or machine).                                                                    |
     48 | **-a, --architecture**            | Select the architecture to install.                                                                                         |
     49 | **--locale**                      | Locale to use (BCP47 format).                                                                                               |
     50 | **--ignore-security-hash**        | Ignore the installer hash check failure.                                                                                    |
     51 | **--ignore-local-archive-malware-scan** | Ignore the malware scan performed as part of installing an archive-type package from a local manifest.                  |
     52 | **--accept-package-agreements**   | Accept all license agreements for packages.                                                                                 |
     53 | **--accept-source-agreements**    | Accept all source agreements during source operations.                                                                      |
     54 | **--header**                      | Optional Windows-Package-Manager REST source HTTP header.                                                                   |
     55 | **-r, --recurse, --all**         | Upgrade all installed packages to the latest version if available.                                                           |
     56 | **--pinned,--include-pinned**    | Upgrade packages even if they have a non-blocking pin.                                                                      |
     57 | **--uninstall-previous**         | Uninstall the previous version of the package during the upgrade.                                                            |
     58 | **--wait**                        | Prompts the user to press any key before exiting.                                                                           |
     59 | **--logs,--open-logs**           | Open the default logs location.                                                                                             |
     60 | **--verbose,--verbose-logs**     | Enable verbose logging for winget.                                                                                          |
     61 | **--disable-interactivity**      | Disable interactive prompts.                                                                                                |
     62 | **--installer-type**             |        Select the installer type
     63 | **--skip-dependencies**          |        Skips processing package dependencies and Windows features                                                           |
     64 
     65 ### Example queries
     66 
     67 The following example upgrades a specific version of an application.
     68 
     69 ```CMD
     70 winget upgrade powertoys --version 0.15.2
     71 ```
     72 
     73 The following example upgrades an application from its ID.
     74 
     75 ```CMD
     76 winget upgrade --id Microsoft.PowerToys
     77 ```
     78 
     79 The following example shows upgrading all apps
     80 
     81 ```CMD
     82 winget upgrade --all
     83 ```
     84 
     85 ## Using **list** and **upgrade**
     86 
     87 It is common to use the [**list**](list.md) command to identify apps in need of an update, and then to use **upgrade** to install the latest.
     88 
     89 In the example below you will see [**list**](list.md) identifies that an update is available for **JetBrains.Toolbox**, and then the user uses **upgrade** to update the application.
     90 
     91 ![upgrade command usage](images/upgrade.gif)
     92 
     93 ## **upgrade** --all
     94 
     95 **upgrade --all** will identify all the applications with upgrades available. When you run **winget upgrade --all** the Windows Package Manager will look for all applications that have updates available and attempt to install the upgrade.
     96 
     97 ## Related topics
     98 
     99 * [Use the winget tool to install and manage applications](index.md)