3

When I run winget list python I get that Python.Python.3 is installed by winget; however, running python says the executable is missing.

winget uninstall --id Python.Python.3 runs the uninstaller but the uninstaller halts and does not complete.

Is there a way to force the complete removal of a corrupted winget package installation?

treedust
  • 41
  • 1
  • 9
  • I would just reinstall the package. I don't know the exact command, but I am sure, there is a way to force install the package so you can uninstall it. Since this package wouldn't actually use the registry you can also just remove the folder that contains the exectuable. – Ramhound May 06 '22 at 15:40
  • @Ramhound the `--force` flag is to ignore hash mismatches. Yes, the un/install runs, however was halting. I posted a solution I found. Please let me know your thoughts. Thank you. https://docs.microsoft.com/en-us/windows/package-manager/winget/upgrade#options – treedust May 16 '22 at 02:27

1 Answers1

1

Summary: winget thought Python.Python.3 was still installed because of a regedit key sticking around, hence why winget list python reports it being installed. The uninstaller was a remnant from a previously malformed uninstallation (most likely from the same reason a regedit key was still existing).

Solution: Removing the Python.Python.3 package's Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall regedit (Registry Editor) key resulted in allowing to re-install the package via winget install --id Python.Python.3.

treedust
  • 41
  • 1
  • 9