microsoft / microsoft/winget-cli

Handle already uninstalled applications

Open
#2,171 9 comments 15 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Command-Uninstall Issue-Feature
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

Description of the new feature / enhancement

When the files no longer exist for an uninstaller, but the ARP entry does exist, running winget uninstall <package> (especially if run during the uninstallPrevious upgrade flow) results in an error 0x800401f5 : Application not found

This is the same error which causes appwiz.cpl to report this message on an attempted uninstall - “An error occurred while trying to uninstall. It may have already been uninstalled. Would you like to remove from the Add or Remove Programs list?”

As a user, I would expect winget to be able to detect this and proceed with the upgrade, remove the errant ARP entry, and/or provide a clearer error/warning.

  • See also #2170

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the winget uninstall <package> path and the uninstallPrevious upgrade flow when an ARP entry exists but its uninstaller files are missing. Compare the behavior with appwiz.cpl and confirm whether the expected result is to continue the upgrade, remove the ARP entry, or report a clearer warning; done means the agreed behavior is covered for this error case.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli, operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.