PowerShell - Clean up the Windows installer folder

1 min read · Updated 8 July 2022

Did this guide help you? You can support me by subscribing to the channel, sharing it, disabling your ad blocker or making a donation. Thank you!

Hello,

I had already posted an article about the c:\windows\installer folder in Windows:
https://www.altf4-formation.fr/en/how-to-clean-windows-installer-folder

It is also possible to do this in PowerShell using the MSIPatches module:
https://github.com/markkerry/MSIPatches

# Install module
Install-Module -Name MSIPatches
# Display patch information
Get-MsiPatch
# List orphaned packages
Get-OrphanedPatch
# It is advisable to save (move in this case) orphaned files
Get-OrphanedPatch | Move-OrphanedPatch -Destination D:\Backup_Installer
# Delete files directly
Get-OrphanedPatch | Remove-Item

Related links