add-appxpackage remove previous version code example
Example 1: uninstall appx
Remove-AppxPackage -Package "package1_1.0.0.0_neutral__8wekyb3d8bbwe"
Example 2: uninstall appx
Get-AppxPackage <PACKAGENAME> | Remove-AppxPackage
Remove-AppxPackage -Package "package1_1.0.0.0_neutral__8wekyb3d8bbwe"
Get-AppxPackage <PACKAGENAME> | Remove-AppxPackage