microsoft / microsoft/winget-cli
Manifest fields for custom uninstall arguments and return codes
@dkbennett is already working on this.
Since Sep 8, 2025.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Description of the new feature / enhancement
We currently have a bunch of manifest fields for installing packages:
InstallerSwitches:
Custom: /allthethings
Silent: /VERYSILENT
SilentWithProgress: /somewhatsilent
InstallerSuccessCodes:
- 12
- 57
- 99
But we don't have any for uninstalling packages. Many packages return funny error codes that still mean success after an uninstall, or require special arguments to make uninstall 100% silent. Currently, there isn't a way to tell winget to use these.
(I believe this will help with the Edge WebView2 issues, as it requires user interaction to uninstall and then it exits with a non-zero code, which halts the upgrade leaving the user with no WebView2).
Proposed technical implementation details
Some matching manifest keys that work similarly to the existing installer fields, per installer (I realize that it may be difficult to make a best guess at InstallerType if winget didn't install the package to begin with, but that will need to be implemented anyway at some point). Ideally, these switches should be ran on the local uninstall executable, presuming it still exists.
If a manifest isn't available for an app that a user wants to uninstall, then the current behavior should be preserved.
UninstallerSwitches:
Custom: /uninstallallthethings
Silent: /VERYSILENT
SilentWithProgress: /somewhatsilent
UninstallerSuccessCodes:
- 12
- 57
- 99
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.