Yes, you can do that with help of ADB (Android debug bridge). More detailed instructions can be obtained from the above mentioned site.
To use adb with a device connected over USB, you must enable USB debugging in the device system settings, under Developer options.
On Android 4.2 and higher, the Developer options screen is hidden by default. To make it visible, go to Settings > About phone and tap Build number seven times.
Return to the previous screen to find Developer options at the bottom.
On some devices, the Developer options screen might be located or named differently. If connected, you'll see the device name listed as a "device."
Connecting to a device via USB
You will need to connect your device to your PC via USB and open adb through a command prompt. From here simply type
adb devices to retrieve currently connected devices.
Connecting to a device over Wi-Fi
adb usually communicates with the device over USB, but you can also use adb over Wi-Fi after some initial setup over USB, as described below:
Connect your Android device and adb host computer to a common Wi-Fi network accessible to both, you might need to configure your firewall to properly support adb.
Connect to the device by its IP address.
adb connect device_ip_address e.g
adb connect 127.0.0.1
Confirm that your host computer is connected to the target device:
From command prompt type:
You will see a list of attached devices
You’re all setnow.
There are a couple of commands that can be used to uninstall apps via adb command:
adb remove (full app filename, no extension) eg
adb remove com.developer.appname
adb shell rm /data/app/(full app filename with apk extension)
to find the file name, use
adb shell ls /data/app/
adb uninstall <package_name> e.g
adb uninstall com.developer.appname
If you want to keep the app’s data and cache directory, then use this command:
adb uninstall -K packagename.apk. e.g.
adb uninstall -K com.developer.appname
- Another variant is used:
adb shell pm uninstall com.developer.appname
- Can I uninstall an app via adb
- Android Debug Bridge
- How to Install/Uninstall Applications using Android ADB
- Android Studio : How to uninstall APK (or execute adb command) automatically before Run or Debug?