Skip to content

winget uninstall not fully uninstalling dbc and leaves system in inconsistent state #319

Closed

Description

@amoeba

I had dbc 0.1.0 on my system via winget and when I uninstalled it with winget uninstall, it appears to succeed. But when I try to install dbc again with winget, it fails with this,

C:\Users\Bryce>winget install dbc
Found an existing package already installed. Trying to upgrade the installed package...
No applicable upgrade found.
A newer package version is available in a configured source, but it does not apply to your system or requirements.

When I check the registry (HKLM), I see dbc's uninstall is still registered but the path to its uninstall no longer exists. i.e., I think our uninstall doesn't remove itself from the registry like it should.

There's a workaround which is to winget install --force dbc.

Activity

  1. self-assigned this
    on Feb 17, 2026
  2. amoeba commented on Feb 17, 2026

    @amoeba
    MemberAuthor

    Maybe related, I just installed dbc 0.2.0 from winget and it registered its uninstaller in HKLM when I expected it to be in HKCU.

  3. amoeba commented on Feb 17, 2026

    @amoeba
    MemberAuthor

    Even after manually removing the key in HKLM, I run into this:

    C:\Users\Bryce\src\columnar-tech\dbc>winget list dbc
    Name                                    Id                                                     Version
    ----------------------------------------------------------------------------------------------------------
    ODBC Driver for Teradata nt-x8664 20.00 ARP\Machine\X64\{57092EE1-625B-4EC8-8919-2405CE4C2000} 20.00.00.35
    
    C:\Users\Bryce\src\columnar-tech\dbc>winget install dbc
    Found dbc [Columnar.dbc] Version 0.2.0
    This application is licensed to you by its owner.
    Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
    Downloading https://github.com/columnar-tech/dbc/releases/download/v0.2.0/dbc-0.2.0-x64.msi
      ██████████████████████████████  4.36 MB / 4.36 MB
    Successfully verified installer hash
    Starting package install...
    Successfully installed
    
    C:\Users\Bryce\src\columnar-tech\dbc>winget list dbc
    Name                                    Id                                                     Version     Source
    ------------------------------------------------------------------------------------------------------------------
    dbc                                     Columnar.dbc                                           0.2.0       winget
    ODBC Driver for Teradata nt-x8664 20.00 ARP\Machine\X64\{57092EE1-625B-4EC8-8919-2405CE4C2000} 20.00.00.35
    
    C:\Users\Bryce\src\columnar-tech\dbc>winget uninstall dbc
    Found dbc [Columnar.dbc]
    Starting package uninstall...
    Successfully uninstalled
    
    C:\Users\Bryce\src\columnar-tech\dbc>winget list dbc
    Name                                    Id                                                     Version     Source
    ------------------------------------------------------------------------------------------------------------------
    dbc                                     Columnar.dbc                                           0.2.0       winget
    ODBC Driver for Teradata nt-x8664 20.00 ARP\Machine\X64\{57092EE1-625B-4EC8-8919-2405CE4C2000} 20.00.00.35
    
  4. amoeba commented on Feb 17, 2026

    @amoeba
    MemberAuthor

    Okay this isn't a winget-only thing. When I download the MSI installer from the CDN, I can't uninstall it cleanly through add/remove. Looking at the registry, it sets the installer path to the path where we downloaded the installer to and if I remove it, uninstall fails. When I've made installers before, I store the installer/uninstaller next to the program, and we clearly need to do something like that.

  5. amoeba commented on Feb 17, 2026

    @amoeba
    MemberAuthor

    I've reduced this down to us setting the <Product Id... to a fixed value rather than *. Per https://learn.microsoft.com/en-us/windows/win32/msi/productcode, this value should change for every release. I found this surprising but it appears the real GUID as far as uninstalls are concerned is UpgradeCode="3BC2470F-54EE-47F0-973C-A789684BF95E".

    Edit: See also this guidance on package ID that says we shouldn't set a fixed value either: https://learn.microsoft.com/en-us/windows/win32/msi/package-codes

  6. added a commit that references this issue on Feb 20, 2026
    7a28368
  7. added a commit that references this issue on Apr 17, 2026
    1179926
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions