Skip to content

Commit 3132e4d

Browse files
denelonmattwojo
andauthored
WinGet repair command (#5542)
* Adding repair * Add markdown for repair * fix missing reference * Update screenshot and add a bit more context to definition --------- Co-authored-by: Matt Wojciakowski <[email protected]>
1 parent f9ff26b commit 3132e4d

File tree

2 files changed

+83
-0
lines changed

2 files changed

+83
-0
lines changed
38.5 KB
Loading

hub/package-manager/winget/repair.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
title: repair Command
3+
description: Repairs the specified application.
4+
ms.date: 07/15/2025
5+
ms.topic: overview
6+
---
7+
8+
# repair command (winget)
9+
10+
The **repair** command of the [winget](index.md) tool repairs the specified application. This is useful when an app is malfunctioning or has corrupted files but doesn't require a full reinstall.
11+
12+
Use the [**list**](list.md) command to identify the application you want to repair. The **repair** command requires that you specify the exact string to repair. If there is any ambiguity, you will be prompted to further filter the **repair** command to an exact application.
13+
14+
## Usage
15+
16+
`winget repair [[-q] <query> ...] [<options>]`
17+
18+
:::image type="content" source="./images/repair.png" alt-text="Screenshot listing winget repair command options." lightbox="./images/repair.png":::
19+
20+
## Aliases
21+
22+
The following aliases are available for this command:
23+
24+
- fix
25+
26+
## Arguments
27+
28+
The following arguments are available.
29+
30+
| Argument | Description |
31+
|-------------|-------------|
32+
| **-q,--query** | The query used to search for an app. |
33+
34+
The query argument must be provided as a positional parameter. Wildcard syntax is not supported. Typically, this is a string that uniquely identifies the package you want to install.
35+
36+
## Options
37+
38+
These options allow you to customize the install experience to meet your needs.
39+
40+
| Option | Description |
41+
|-------------|-------------|
42+
| **-m, --manifest** | Must be followed by the path to the manifest (YAML) file. You can use the manifest to run the repair experience from a local YAML file. |
43+
| **--id** | Limits the install to the ID of the application. |
44+
| **--name** | Limits the search to the name of the application. |
45+
| **--moniker** | Limits the search to the moniker listed for the application. |
46+
| **-v, --version** | Enables you to specify an exact version to install. If not specified, latest will install the highest versioned application. |
47+
| **--product-code** | Filters using the product code. |
48+
| **-a, --architecture** | Select the architecture to install. |
49+
| **--scope** | Allows you to specify if the installer should target user or machine scope. See [known issues relating to package installation scope](./troubleshooting.md#scope-for-specific-user-vs-machine-wide).|
50+
| **-s, --source** | Restricts the search to the source name provided. Must be followed by the source name. |
51+
| **-i, --interactive** | Runs the installer in interactive mode. The default experience shows installer progress. |
52+
| **-h, --silent** | Runs the installer in silent mode. This suppresses all UI. The default experience shows installer progress. |
53+
| **-o, --log** | Directs the logging to a log file. You must provide a path to a file that you have the write rights to. |
54+
| **--ignore-local-archive-malware-scan** | Ignore the malware scan performed as part of installing an archive type package from local manifest. |
55+
| **--accept-source-agreements** | Used to accept the source license agreement, and avoid the prompt. |
56+
| **--accept-package-agreements** | Used to accept the license agreement, and avoid the prompt. |
57+
| **--locale** | Specifies which locale to use (BCP47 format). |
58+
| **--header** | Optional Windows-Package-Manager REST source HTTP header. |
59+
| **--authentication-mode** | Specify authentication window preference (silent, silentPreferred or interactive). |
60+
| **--authentication-account** | Specify the account to be used for authentication. |
61+
| **--force** | Direct run the command and continue with non security related issues. |
62+
| **--ignore-security-hash** | Ignore the installer hash check failure. Not recommended. |
63+
| **-e, --exact** | Uses the exact string in the query, including checking for case-sensitivity. It will not use the default behavior of a substring. |
64+
| **-?, --help** | Get additional help on this command. |
65+
| **--wait** | Prompts the user to press any key before exiting. |
66+
| **--logs,--open-logs** | Open the default logs location. |
67+
| **--verbose, --verbose-logs** | Used to override the logging setting and create a verbose log. |
68+
| **--nowarn,--ignore-warnings** | Suppresses warning outputs. |
69+
| **--disable-interactivity** | Disable interactive prompts. |
70+
| **--proxy** | Set a proxy to use for this execution. |
71+
| **--no-proxy** | Disable the use of proxy for this execution. |
72+
73+
### Example queries
74+
75+
The following example repairs an application.
76+
77+
```CMD
78+
winget repair Micrososft.WinGetCreate
79+
```
80+
81+
## Related topics
82+
83+
* [Use the winget tool to install and manage applications](index.md)

0 commit comments

Comments
 (0)