Android OS Forum banner
1 - 5 of 5 Posts

·
Premium Member
Joined
·
4,348 Posts
I posted this as a reply to someone in the MIUI thread, but it'll soon get buried and felt it deserved its own topic for those who might find it useful and didn't know how to do it.

How to uninstall system apps or any other app on the command line (requires root)

Someone mentioned you could uninstall apps just by deleting the directory. Sure you could do that, but it's messy and you wouldn't just remove the folder to something you downloaded with a package manager on linux or installed on windows, would you?

A better way is to uninstall so you do it cleanly is something like this in the terminal emulator, ssh or in adb by using the command "adb shell" (if you for instance want to get rid of google talk):

If you sort of know what you're looking for by partial name of the app (where "talk" is the partial name of the app), this will tell you the package name to uninstall:

Code:
<br />
su<br />
pm list packages | grep -i talk<br />
You should see something show up after like package:com.google.android.talk

The bolded part from above (com.google.android.talk) is what we need for uninstalling, this is the package name.

If you don't know what you're looking for then list every package (it'll be sort of long):

Code:
<br />
su<br />
pm list packages<br />
after that, you can uninstall it with the package manager:

Code:
pm uninstall com.google.android.talk
If you just wish to disable the app (the same thing as freezing it in titanium backup):

Code:
pm disable com.google.android.talk
To unfreeze:

Code:
pm enable com.google.android.talk
 

·
Premium Member
Joined
·
4,348 Posts
Out of curiosity, what would be the difference between using Terminal Emulator and using Root Explorer to delete the apk in system>app, then in data>data?

Sent from my cellular telephone
Deleting the app in some file manager is the same as doing

rm -f /data/app/some_app
rm -r -f /data/data/some_app_dir

Which is (for those that aren't familiar with linux commands or generally use windows) the same as deleting a directory only with no recycle bin.

Uninstalling or installing with package manager is like using dpkg on debian or ubuntu (or when you're typing "adb install" on the command line on your computer, you're using package manager).

I would say that it removes any data you might have missed...but it does not at least for data on the sdcard. If you moved something there or the app installed something there, it will still be there, orphaned from the app.

However, it does remove any temp data the app leaves behind on your phone and the cache data that you would normally have to reboot to clear out in recovery. If the app is also in use, it makes sure that it closes first before removing as well.
 
1 - 5 of 5 Posts
Top