Skip to content

Updating portable package removes its PATH entry #6461

Description

Relevant area(s)

WinGet CLI

Relevant command(s)

winget upgrade

Brief description of your issue

This affects at least portable packages. I have noticed it for Anthropic.ClaudeCode package.
Once it's installed for the first time everything is fine. The %APPDATALOCAL%\Microsoft\WinGet\Packages\Microsoft.Sysinternals.Suite_Microsoft.Winget.Source_8wekyb3d8bbwegets is added to PATH correctly. The problem occurs when the package is upgraded to a newer version. Once it's done the PATH entry gets removed and claude is not recognized anywhere.

Steps to reproduce

Consider these steps to reproduce as a suggestion. I tried a sequence of uninstall, installing a specific version, then upgrading to the latest one but the bug does not occurs. I suppose something different causes it to happen.

  1. winget install Anthropic.ClaudeCode - notice the PATH entry is correct
  2. Wait for the update
  3. sudo winget upgrade --all (I suppose any other method also works but this is how I usually run it) - Now the PATH entry gets removed

Expected behavior

The PATH entry should be retained or updated if needed.

Actual behavior

PATH entry for claude sometimes gets removed

Environment

Windows Package Manager v1.29.280
© 2026 Microsoft. All rights reserved.

Windows: Windows.Desktop v10.0.26200.8893
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.29.280.0

WinGet Directories
------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState…
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState…
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                     Disabled
LocalArchiveMalwareScanOverride           Disabled
ProxyCommandLineOptions                   Disabled
ConfigurationProcessorPath                Disabled
DefaultProxy                              Disabled

Metadata

Metadata

Assignees

No one assigned

    Labels

    Command-UpgradeIssue related to WinGet UpgradeIssue-BugIt either shouldn't be doing this or needs an investigation.Needs-TriageIssue needs to be triagedPossible-DuplicateAutomatically surfaced as a likely duplicate of an existing issue; awaiting maintainer confirmation.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions