Skip to content

winget reports wrong version of chocolatey installed #6253

@petermac-

Description

@petermac-

Relevant area(s)

WinGet CLI

Relevant command(s)

No response

Brief description of your issue

When I enter the command winget list --upgrade-available I get the following output:
`
The following packages have an upgrade available, but require explicit targeting for upgrade: Name Id Version Available Source

Chocolatey (Install Only) Chocolatey.Chocolatey 2.7.1.0 2.7.2.0 winget
`

However chocolatey is already updated to its latest version. Entering choco --version outputs the latest version 2.7.2.0. When I force reinstall chocolatey with choco upgrade chocolatey -f chocolatey successfully reinstalls but winget list --upgrade-available still lists the previous version of chocolatey. If I enter where choco there's a second version of chocolatey here: C:\Users\peter\AppData\Local\UniGetUI\Chocolatey\bin\choco.exe but that version is also the latest 2.7.2.0.

Steps to reproduce

Run the following commands:
winget list --upgrade-available choco upgrade chocolatey -f

Expected behavior

After reinstalling chocolatey winget should detect that it is already the latest version.

Actual behavior

winget does not detect that chocolatey was upgraded.

Environment

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

Windows: Windows.Desktop v10.0.26200.8457
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.28.240.0

Winget Directories
--------------------------------------------------------------------------------------------- Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8we… User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8we… 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
DefaultProxy                              Disabled

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-ExternalIssue outside of winget-cli sourceIssue-BugIt either shouldn't be doing this or needs an investigation.

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions