microsoft / microsoft/winget-cli

Unable to update or uninstall a renamed package

Open
#5,683 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Relevant area(s)

WinGet CLI

Relevant command(s)

winget uninstall

Brief description of your issue

I use WinGet through UniGet which simplifies things for me with a convenient GUI. A month ago I uninstalled my gallery-dl package that I installed with chocolatey and shifted to use WinGet for it. I installed the mikf.gallery-dl.Nightly package. I realized that the exe was being appended with the "nightly" suffix and I learned of the rename parameter that can fix that. So I uninstalled the package and reinstalled it using the following command that was generated by UniGet:

winget.exe update --id "mikf.gallery-dl.Nightly" --exact --source winget --accept-source-agreements --disable-interactivity --silent --include-unknown --accept-package-agreements --force

It installed and everything was okay. However, I've come to realize that I could not update the package. It's been around a few weeks now that I can not upgrade the package despite even using --ignore-security-hash thinking that was the issue. Today, I've come to find that I can't even uninstall the package. I've checked %LOCALAPPDATA%\Microsoft\WinGet\Links and the link was there along with the folder the link directed to. Using the exe works fine too ([gallery-dl][debug] Version 1.30.0-dev:2025.07.14 - Executable (dev/windows)).

❯  winget list gallery-dl
Name       Id                      Version    Available  Source
---------------------------------------------------------------
gallery-dl mikf.gallery-dl.Nightly 2025.07.14 2025.08.22 winget

I don't know how to proceed to fix this issue I'm having because I have the package installed, WinGet lists the package as installed, but both the upgrade and uninstall commands are failing. What is the problem here, is the problem because I renamed the package?

Logs

The logs were taken from UniGet's log which was similar to the logs within "Operation History" which I assume was the direct WinGet logs

Update Failed

Package update operation for Package=mikf.gallery-dl.Nightly with Manager=Winget
Installation options: <InstallOptions instance (only non-default values are shown)
	SkipHashCheck: True
	CustomParameters_Install: [--rename, "gallery-dl.exe"]
	OverridesNextLevelOpts: True>
Overriden options: <Scope=;RunAsAdministrator=;WG_SpecifyVersion=;PS_NoScope=False>
Version: 2025.07.14 -> 2025.08.22
Starting operation...
Executing process with StartInfo:
 - FileName: "C:\Users\<user>\AppData\Local\Microsoft\WindowsApps\winget.exe"
 - Arguments: "update --id "mikf.gallery-dl.Nightly" --exact --source winget --accept-source-agreements --disable-interactivity --silent --include-unknown --accept-package-agreements --force --ignore-security-hash"
Start Time: "8/24/2025 10:20:52 AM"
No installed package found matching input criteria.
End Time: "8/24/2025 10:20:54 AM"
Process return value: "-1978335212" (0x8A150014)
gallery-dl could not be updated

Uninstall Failed

Package uninstall operation for Package=mikf.gallery-dl.Nightly with Manager=Winget
Installation options: <InstallOptions instance (only non-default values are shown)
	SkipHashCheck: True
	CustomParameters_Install: [--rename, "gallery-dl.exe"]
	OverridesNextLevelOpts: True>
Overriden options: <Scope=;RunAsAdministrator=;WG_SpecifyVersion=;PS_NoScope=False>
Starting operation...
Executing process with StartInfo:
 - FileName: "C:\Users\<user>\AppData\Local\Microsoft\WindowsApps\winget.exe"
 - Arguments: "uninstall --id "mikf.gallery-dl.Nightly" --exact --source winget --accept-source-agreements --disable-interactivity --version "2025.07.14" --silent"
Start Time: "8/24/2025 10:23:30 AM"
No installed package found matching input criteria.
End Time: "8/24/2025 10:23:31 AM"
Process return value: "-1978335212" (0x8A150014)
gallery-dl could not be uninstalled

Steps to reproduce
  1. Install mikf.gallery-dl.Nightly via WinGet:
  2. Uninstall the package
  3. Reinstall the package but with the rename flag (winget.exe update --id "mikf.gallery-dl.Nightly" --exact --source winget --accept-source-agreements --disable-interactivity --silent --include-unknown --accept-package-agreements --force)
  4. ---> BUG: Attempt to update/uninstall the package
Expected behavior

Successfully update or uninstall the package

Actual behavior

Unable to update nor uninstall the package

Environment
❯  winget --info
Windows Package Manager v1.11.430
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.19045.6218
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.26.430.0

Winget Directories
-----------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Diag…
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\sett…
Portable Links Directory (User)    %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User)       %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root              C:\Program Files\WinGet\Packages
Portable Package Root (x86)        C:\Program Files (x86)\WinGet\Packages
Installer Downloads                %USERPROFILE%\Downloads
Configuration Modules              %LOCALAPPDATA%\Microsoft\WinGet\Configuration\Modules

Links
---------------------------------------------------------------------------
Privacy Statement   https://aka.ms/winget-privacy
License Agreement   https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage            https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

Admin Setting                             State
--------------------------------------------------
LocalManifestFiles                        Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Enabled
LocalArchiveMalwareScanOverride           Disabled
ProxyCommandLineOptions                   Disabled
DefaultProxy                              Disabled

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

Reproduce the installation with mikf.gallery-dl.Nightly and the --rename option, then compare the winget list result with the failing update and uninstall commands. Start with the supplied WinGet logs and error code; done means both operations locate the installed package and complete successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.