microsoft / microsoft/winget-cli

get-wingetpackage listing uninstalled packages

Open
#5,479 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Bug PowerShell
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

Brief description of your issue

What is expected to happen is after successfully installing below package via:

Install-WinGetPackage -id '9PLFNLNT3G5G' -mode silent -installertype MSStore -matchoption Equals

when one successfully uninstalls the same package it is no longer listed via get-wingetpackage.

Steps to reproduce
install-wingetpackage -id '9PLFNLNT3G5G' -matchoption Equals -verbose
get-appxpackage -allusers -name 'AppUp.IntelGraphicsExperience'
uninstall-wingetpackage -name -id '9PLFNLNT3G5G' -matchoption Equals -verbose
get-appxpackage -allusers -name 'AppUp.IntelGraphicsExperience'
get-wingetpackage -name -id '9PLFNLNT3G5G' -matchoption Equals -verbose
Expected behavior
uninstall-wingetpackage -name -id '9PLFNLNT3G5G' -matchoption Equals -verbose
VERBOSE: Creating MTA thread

Id           Name                           Source  UninstallerErrorCode Status RebootRequired ExtendedErrorCode Correl
                                                                                                                 ationD
                                                                                                                 ata
--           ----                           ------  -------------------- ------ -------------- ----------------- ------
9PLFNLNT3G5G Intel® Graphics Command Center msstore 0                    Ok     False

PS C:\> get-appxpackage -allusers -name 'AppUp.IntelGraphicsExperience'
PS C:\> get-wingetpackage -name -id '9PLFNLNT3G5G' -matchoption Equals -verbose
PS C:\>
Actual behavior
uninstall-wingetpackage -id '9PLFNLNT3G5G' -matchoption Equals -verbose
VERBOSE: Creating MTA thread

Id           Name                           Source  UninstallerErrorCode Status RebootRequired ExtendedErrorCode Correl
                                                                                                                 ationD
                                                                                                                 ata
--           ----                           ------  -------------------- ------ -------------- ----------------- ------
9PLFNLNT3G5G Intel® Graphics Command Center msstore 0                    Ok     False

PS C:\> get-appxpackage -allusers -name 'AppUp.IntelGraphicsExperience'
PS C:\> get-wingetpackage -id '9PLFNLNT3G5G' -matchoption Equals -verbose

Name                           Id           Version      Available Source
----                           --           -------      --------- ------
Intel® Graphics Command Center 9PLFNLNT3G5G 1.100.5688.0           msstore
Environment
winget --info
Windows Package Manager v1.10.390
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.26100.4061
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.25.390.0

Winget Directories
-----------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Diag…
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\sett…
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

get-module microsoft.winget.client | format-table -property * -wrap

LogPipelineExecutionDetails Name                    Path
--------------------------- ----                    ----
                      False Microsoft.WinGet.Client C:\Program Files\WindowsPowerShell\Modules\Microsoft.WinGet.Client\
                                                    1.10.340\net48\Microsoft.WinGet.Client.Cmdlets.dll

get-help get-wingetpackage

NAME
    Get-WinGetPackage

SYNOPSIS
    Lists installed packages.


SYNTAX
    Get-WinGetPackage [[-Query] <System.String[]>] [-Command <System.String>] [-Count <System.UInt32>] [-Id
    <System.String>] [-MatchOption {Equals | EqualsCaseInsensitive | StartsWithCaseInsensitive |
    ContainsCaseInsensitive}] [-Moniker <System.String>] [-Name <System.String>] [-Source <System.String>] [-Tag
    <System.String>] [<CommonParameters>]


DESCRIPTION
    This command lists all of the packages installed on your system. The output includes packages installed from
    WinGet sources and packages installed by other methods. Packages that have package identifiers starting with
    `MSIX` or `ARP` could not be correlated to a WinGet source.


RELATED LINKS
    Uninstall-WinGetPackage
    Update-WinGetPackage

REMARKS
    To see the examples, type: "get-help Get-WinGetPackage -examples".
    For more information, type: "get-help Get-WinGetPackage -detailed".
    For technical information, type: "get-help Get-WinGetPackage -full".
    For online help, type: "get-help Get-WinGetPackage -online"

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

Start by reproducing the sequence with Install-WinGetPackage, Uninstall-WinGetPackage, and Get-WinGetPackage for package 9PLFNLNT3G5G, comparing the AppX results with the final listing. Trace the Get-WinGetPackage installed-package query and its Microsoft Store correlation path. Done means an uninstalled package no longer appears in the command output.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, powershell
Domain
cli, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.