microsoft / microsoft/winget-cli

Any packages that has ArchiveBinariesDependOnPath doesn't remove its path from PATH env on uninstall

Open
#6,160 2 comments 1 reaction 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

Supposedly, any user would expect winget uninstall command to remove every resimance of said packages (that includes PATH entry), but winget does not seems to do that in this case.

Steps to reproduce

Choose any packages that specifically has ArchiveBinariesDependOnPath: true in them, in this case I will use VovSoft.3DBoxMaker:

  1. winget install VovSoft.3DBoxMaker --installer-type portable
  2. Open sysdm.cpl to see the new path in user scope
  3. winget uninstall VovSoft.3DBoxMaker
  4. Open sysdm.cpl again and see the path still exists, rather than removed

Note that PATH entry still persists despite after I'm completely rebooting the machine, so it never even modifying anything related to the PATH on uninstall command.

Image

That would become a problem because the leftover PATH entry can accumulate and actually blocking user to modify the PATH ever again until the user have to remove it manually (happens to me):

Image
Expected behavior

That package PATH entry should automatically get cleaned up on uninstall.

Actual behavior

It doesn't.

Environment
Windows Package Manager v1.28.220
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.26200.8246
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.28.220.0

Winget Directories
-------------------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
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                        Enabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Enabled
LocalArchiveMalwareScanOverride           Enabled
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

Begin at the winget uninstall flow for portable packages and trace handling of manifests with ArchiveBinariesDependOnPath: true; reproduce with VovSoft.3DBoxMaker and inspect the user PATH before and after uninstall. Done means the package's PATH entry is removed after uninstall, including after reboot, without affecting unrelated entries.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.