Skip to content

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

@KarbitsCode

Description

@KarbitsCode

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Command-UninstallIssue related to WinGet UninstallIssue-BugIt either shouldn't be doing this or needs an investigation.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions