microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
23.24k stars 1.45k forks source link

"Ghost" installations of certain apps #4067

Open lajawi opened 9 months ago

lajawi commented 9 months ago

Brief description of your issue

When using the upgrade command (winget upgrade), it lists all availabe updates, but there are several that can't be updated or uninstalled. To me, they seem like ghost applications.

Steps to reproduce

I don't know what I did to get here.

Expected behavior

Every app either not installed or updated should not be displayed when running winget upgrade.

Actual behavior

> winget upgrade
Name             ID                            Version  Available Quelle
------------------------------------------------------------------------
digiKam 7.9.0    KDE.digikam                   7.9.0    8.2.0     winget
blender          BlenderFoundation.Blender.LTS 3.3.3    3.3.14    winget

Above, you see several applications, supposedly awaiting an update, but in both cases, updating them doesn't do anything about these "entries".

With digiKam, it downloads and runs the 8.2.0 installer, even though 8.2.0 is already installed, and 7.9.0 isn't even on my pc.

In the case of blender, I can't update or uninstall it, every time I try, I get exitcode 1605.

In both cases, even if they aren't installed, they show up when I run winget upgrade (blender isn't installed, digiKam is).

This issue is similar to #4066.

Environment

Windows: Windows.Desktop v10.0.22631.3007
Systemarchitektur: X64
Paket: Microsoft.DesktopAppInstaller v1.21.3482.0
stephengillie commented 9 months ago

Sometimes, the best method is to perform the uninstall multiple times, to remove all old versions. Then to perform the install again. The ultimate root cause is having old entries in the Registry, and sometimes on disk. This might happen if one version were installed through one installer type, and then another version installed through another type. And so detangling this situation sometimes requires working at it from multiple sides.

When you say you're unable to uninstall blender, is that only through WinGet, or is the Apps Settings page uninstaller also unsuccessful?

lajawi commented 9 months ago

When you say you're unable to uninstall blender, is that only through WinGet, or is the Apps Settings page uninstaller also unsuccessful?

When using WinGet, it gives me error 1605, as the uninstaller can't be found. This version of Blender doesn't even show up in the settings app.

Sometimes, the best method is to perform the uninstall multiple times, to remove all old versions.

I have tried, but no luck there. It just stays there. In the case of digiKam, the entry even persists in the settings app, but once uninstalled, it's not uninstallable a second time. The version that's displayed in the settings app is 7.9.0, even though 8.2.0 is/was installed. Even the uninstaller says 8.2.0.

denelon commented 7 months ago

We've been working on the side-by-side scenarios. You could try the latest release and enable the experimental feature on:

Please provide feedback at:

davidldennison commented 5 months ago

Think I might have an idea on what's going on here!

When some applications are installed, they also can install other applications as a dependency. A good example of this is applications that install their own version of 7zip. Another example is Fortnite installing GeForce Experience.

Some of these dependencies might be full applications or embedded, but I believe Winget is picking these up as fully installed applications. I believe that's also why you can't uninstall it or see it in the settings app.

Can you check your other installed programs and see if they installed these?

lajawi commented 5 months ago

Can you check your other installed programs and see if they installed these?

@davidldennison how would I check whether or not a different application has any of the above applications as a depency?

I'd like to check, even though I'm quite sure I don't have any other apps dependant on these.

Some additional information on both digiKam and blender:

vatsalyagoel commented 5 months ago

After diving into Winget Source Code and investigating logs, in my case it ended up being a Registry issue.

First, run winget list --upgrade-available --verbose-logs Then winget list --upgrade-available --logs which will open the logs directory.

Find the latest log file which correlates to the command and find which ghost app its trying to update. In that line you will find a product code format {GUID}

Open regedit and navigate to HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\. If the app is 32 bit, go to HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\.

In that list of guids in that registry folder, find your product code and delete the folder, NOTE: Make sure that the app is not installed in your program files, app data etc.

Give your PC a restart then try the winget upgrade command again

lajawi commented 4 months ago

Find the latest log file which correlates to the command and find which ghost app its trying to update. In that line you will find a product code format {GUID}

@vatsalyagoel, I'm unable to find GUID, any chance you could offer some more information? Maybe an example on how it should look?

BTW, how could I fix this issue, while the app is installed (in the case of digiKam)?

denelon commented 4 months ago

Using the latest version of WinGet 1.8, do you see multiple versions of these packages installed? If they are installed, you should now be able to target the individual versions to remove them.

lajawi commented 4 months ago

Using the latest version of WinGet 1.8, do you see multiple versions of these packages installed? If they are installed, you should now be able to target the individual versions to remove them.

@denelon nope, it still won't work. I used the following command:

> winget uninstall BlenderFoundation.Blender -v 3.3.3

Gefunden blender [BlenderFoundation.Blender]
Paket-Deinstallation wird gestartet...
Deinstallation fehlgeschlagen mit Exitcode: 1605
brettcurtis commented 3 months ago

I have this issue with Blender, too. I can't find anything in my registry either. If you do figure out how to remove this, please report back. It has been driving me bonkers.