adb shell command to make Android package uninstall dialog appear

Rinkal Bhanderi picture Rinkal Bhanderi · Oct 18, 2012 · Viewed 216.5k times · Source

I have adb running and device is connected to my system in debugging mode,

I want to uninstall app using intent launch using adb shell am start <INTENT>

I don't want to uninstall using adb uninstall com.company.apppackage and I don't want to do it even by using adb shell pm uninstall com.company.apppackage

How can I send an intent with android.intent.action.DELETE action for a specific package allowing the user to see the prompt and uninstall the program?

Answer

neverever415 picture neverever415 · Dec 12, 2012

Use this command in cmd:

adb shell pm uninstall -k com.packagename

For example:

adb shell pm uninstall -k com.fedmich.pagexray

The -k flag tells the package manager to keep the cache and data directories around, even though the app is removed. If you want a clean uninstall, don't specify -k.