I successfully ran pm uninstall --user 0 packagename
without the -k argument on my phone which isn't rooted, despite the XDA article saying it's needed.
1 Answer
-k
is option to keep cache + appdata:
/data/user*/0/<pkgname>
without that option only the .apk file remains on the device:
/system/app/<pkgname>/base.apk
pm install-existing <pkgname>
will re-enable app with/without appdata depending on -k
(explained in section How to Re-Install)
-
I know, but what confuses me is that the articles I read say that you need to be rooted to be able to leave out the
-k
, but I excluded it on my unrooted phone (just to try) and it worked fine, so I don't know if root's still a requirement.– DanielCommented Oct 31, 2020 at 13:02 -
So what happens when you exclude
-k
? Does anything other than the app get deleted?– DanielCommented Nov 1, 2020 at 15:16