get-wingetpackage listing uninstalled packages
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"
I have found that uninstalled items persist until a new terminal session is opened. @penalvch, is that the case for you too?
I have found that uninstalled items persist until a new terminal session is opened. @penalvch, is that the case for you too?
@jimmy-zhening-luo no. Most packages I've tested show their installation status properly without starting a new session. However, the installation status immediately after uninstallation appears package dependent.
I have found that uninstalled items persist until a new terminal session is opened. @penalvch, is that the case for you too?
@jimmy-zhening-luo no. Most packages I've tested show their installation status properly without starting a new session. However, the installation status immediately after uninstallation appears package dependent.
OK, thank you @penalvch. Then, I am probably encountering a different issue, but if I repro your case I will add details here.