Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between pm clear and pm uninstall -k on Android

from pm help, I get this:

pm uninstall: removes a package from the system. Options:
    -k: keep the data and cache directories around after package removal.

pm clear: deletes all data associated with a package.

Does this mean that when I do pm uninstall (without -k) it deletes all files which would pm clear delete? Or in other words, when I do specify -k for uninstallation command, it leaves files undeleted. When I do pm clear on that package, the files which will be cleared are exactly these I have left undeleted by -k option?

Is it possible that by doing pm uninstall and after that pm clear, I can even delete some files which have not been deleted by pm uninstall?

like image 316
stewenson Avatar asked Jan 16 '14 14:01

stewenson


People also ask

Can you uninstall pre-installed Android apps?

You can't delete some system apps that came pre-installed on your Android phone. But on some phones, you can turn them off so that they won't show on the list of apps on your phone. To learn how to disable apps, contact your device manufacturer.

Does removing apps improve performance?

Both Android and iOS have a recent apps list. Pull up the list and you will find a seemingly endless register of apps that you have opened at some point. Despite what you may think, removing apps from the list won't speed up your smartphone.


1 Answers

Your understanding is correct:

  • pm uninstall removes everything
  • pm uninstall -k removes the app, leaves the user data intact (to be used if the app is reinstalled)
  • pm clear only removes the user data associated with the package, but not the package itself
like image 96
Alex P. Avatar answered Oct 06 '22 21:10

Alex P.