Debloat-Windows-10 icon indicating copy to clipboard operation
Debloat-Windows-10 copied to clipboard

"remove-default-apps.ps1" does not account for dependenices

Open Zamiell opened this issue 5 years ago • 3 comments

When running "remove-default-apps.ps1" on a fresh Windows 10 Pro, it fails upon doing a:

Get-AppxPackage Microsoft.Advertising.Xaml | Remove-AppxPackage

This is because several packages depend on this, such as Microsoft.People, microsoft.windowscommunicationsapps, as so forth. So it should be moved to the bottom of the list, or the logic should be expanded to check for dependencies first and uninstall those before uninstall.

Zamiell avatar Feb 17 '19 02:02 Zamiell

Thanks for the heads up.

When I wrote the scripts initially I did not think about apps depending on each other. I guess it just wasn't a problem at that time. For the time being, I moved Microsoft.Advertising.Xaml to the bottom of the list, maybe this helps with the error.

I'll leave this issue open, marked with help wanted. If anyone wants to add dependency resolving to remove-default-apps.ps1, be my guest :)

W4RH4WK avatar Feb 17 '19 12:02 W4RH4WK

This would be fun to take a stab at, I wonder if the best way to do it is to use Get-AppxPackageManifest, and then parse that for dependencies?

https://docs.microsoft.com/en-us/powershell/module/appx/get-appxpackagemanifest?view=win10-ps

4oo4 avatar Jul 27 '19 23:07 4oo4

i've just made a note for myself that i might need to run this "remove-default-apps" script multiple times, in case of errors and dependencies

mmikeww avatar Dec 08 '19 16:12 mmikeww