'pm uninstall -k --user 0 Failure [DELETE_FAILED_USER_RESTRICTED]

I have been following the instructions from https://www.xda-developers.com/disable-system-app-bloatware-android/ to remove bloatware (that actually kills FCM and blocks notifications.

However I encountered Failure [DELETE_FAILED_USER_RESTRICTED]. I have checked the current user is 0 by am get-current-user, and as far as i understand it is the root user. So why is the uninstallation failed? Any logs or further troubleshooting tips? Thanks very much as this is causing the phone not functioning properly.

PD2170:/ $ pm uninstall -k --user 0 com.iqoo.powersaving
Success
PD2170:/ $ pm list packages | grep pem
package:com.vivo.pem
PD2170:/ $ pm uninstall -k --user 0 com.vivo.pem
Success
PD2170:/ $ pm list packages | grep abe
package:com.vivo.abe
PD2170:/ $ pm uninstall -k --user 0 com.vivo.abe
Failure [DELETE_FAILED_USER_RESTRICTED]


Solution 1:[1]

Some apps can only be removed by root on a rooted device. You can try disabling instead of uninstalling the app for similar results:

pm disable-user --user 0 com.vivo.abe

You can find a full guide here: https://www.xda-developers.com/disable-system-app-bloatware-android/

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Vincent