Skip to content

Prefer package-manager uninstall (winget / scoop / choco) over vendor uninstaller when app was installed via one #948

Description

@chirag127

Summary

BCU already detects Scoop (#244, #666), Chocolatey (#184), and Windows Store (Store-app helper). It even queries winget in some paths (#363 hints at this). What it does not do consistently is delegate the uninstall back through the package manager the app was installed with — it runs the vendor uninstaller instead.

Why this matters

When an app was installed by scoop install X, the correct uninstall is scoop uninstall X. Running the vendor uninstaller instead:

  • Leaves the scoop manifest, shims, and persist directory behind (already reported: why not remove persist scoop when uninstalling package #388 open, "why not remove persist scoop when uninstalling package")
  • Leaves the winget/choco package DB thinking the app is still installed → next winget upgrade --all may reinstall
  • Chocolatey/scoop shims in %USERPROFILE%\scoop\shims or C:\ProgramData�ocolatey�in become dead links

Proposal

Detect the "install source" during scan (BCU can already tell scoop apps from registry keys under HKCU\…\Uninstall\<name> where UninstallString starts with %USERPROFILE%\scoop\…, and choco from C:\ProgramData�ocolatey\lib\<pkg>). Then:

  • Scoop-installed appsscoop uninstall <name> (with --purge when user opts into "remove leftovers")
  • Chocolatey-installed appschoco uninstall <name> -y --remove-dependencies
  • winget-installed appswinget uninstall --id <id> --silent
  • Store apps → keep existing StoreAppHelper path (works)
  • Vendor installer only → keep existing behaviour

Gate behind a settings toggle "Prefer package manager uninstall when available" (default on for scoop/winget, off for choco to stay conservative since some choco packages call vendor uninstaller anyway).

Cross-refs

Version

BCU v6.2.0.0 on Windows 11. Scoop 0.5.x + winget 1.10 + chocolatey 2.x on the same box.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions