Introduction
Android Debug Bridge (ADB) is a powerful command-line tool for managing an Android device from a computer. One of its key uses is uninstalling applications directly, without needing to interact with the device's interface. This is particularly useful for:
- Cleaning the device of unwanted or adware apps (debloating).
- Removing system apps that cannot be uninstalled normally.
- Automating deployment and testing processes.
In this guide, you will learn how to safely and efficiently remove both user and system applications via ADB.
Requirements and Preparation
Before you begin, ensure the following conditions are met:
- On the Android device:
- Developer options are enabled (to do this, tap 'Build number' in 'About phone' 7 times).
- USB debugging is enabled in the developer options.
- The device is connected to the computer via USB (an original cable is recommended).
- A permission request for debugging will appear on the screen—confirm it.
- On the computer:
- ADB is installed (included with Android SDK Platform-Tools or available as a standalone install).
- For Windows: add the path to
adb.exeto thePATHenvironment variable or use the full path. - For Linux/macOS: install the
android-tools-adbpackage via your package manager.
- Verify the connection:
Open a terminal (command prompt) and run:
adb devices
Your device should appear in the list with the statusdevice. If the status isunauthorized, check for the confirmation prompt on your phone.
Uninstalling Apps via ADB
Step 1: Identify the App's Package Name
Every app on Android has a unique package name (e.g., com.spotify.music). To find it:
- List all installed packages:
adb shell pm list packages
The command outputs a list in the formatpackage:package_name. - Filter by name (optional):
adb shell pm list packages | grep -i "chrome"
Replacechromewith part of the app's name. On Linux/macOS usegrep, on Windows usefindstr. - Alternative method via
dumpsys:adb shell dumpsys package | grep -i "package:"
This method provides more detailed information but yields a longer list.
Important: For system apps, the package name may differ from the visible app name. For example, the system browser often has the name com.android.browser.
Step 2: Uninstalling User Apps
If the app is user-installed (not a system app), use the simple command:
adb uninstall <package_name>
Example:
adb uninstall com.spotify.music
What happens:
- ADB sends an uninstall request for the package.
- The app and all its data are completely removed.
- The output will show
Successon success orFailure [DELETE_FAILED_INTERNAL_ERROR]on failure.
Step 3: Uninstalling System Apps
System apps (pre-installed) are typically protected from normal uninstallation. There are two main approaches:
3.1. Disabling the App for the Current User (No Root Required)
This command does not physically remove the app but disables it for the active user (user 0), which is equivalent to "removing" it from the interface:
adb shell pm uninstall --user 0 <package_name>
Example:
adb shell pm uninstall --user 0 com.android.browser
Note: After a reboot or factory reset, disabled apps may reappear.
3.2. Complete Removal with Root Access
If you have root access on the device, you can permanently remove a system app:
adb shell su -c pm uninstall <package_name>
Or, if su is already in the shell:
adb shell
su
pm uninstall <package_name>
⚠️ Caution: Removing system apps can cause system instability. Before deleting, ensure the app is not critical (e.g., com.android.systemui).
Step 4: Verify the Result
After uninstalling, confirm the package is no longer in the list:
adb shell pm list packages | grep -i "<part_of_package_name>"
If the app was disabled (via --user 0), check its status:
adb shell pm list packages -d | grep -i "<package_name>"
The -d flag shows disabled packages.
You can also reboot the device and check if the app reappears:
adb reboot
Common Issues and Solutions
Error: Failure [DELETE_FAILED_INTERNAL_ERROR]
Cause: Attempting to uninstall a system app without using --user 0 or without root.
Solution:
- For disabling, use
adb shell pm uninstall --user 0 <package>. - For complete removal, obtain root access.
Error: Failure [DELETE_FAILED_DEVICE_POLICY_MANAGER]
Cause: The device is managed by policies (e.g., a work device) that prohibit uninstallation.
Solution: Uninstallation is impossible without disabling the policies. Contact your device administrator.
Device Does Not Appear in adb devices
Cause: Drivers (Windows), missing USB debugging permission, incorrect cable.
Solution:
- Reconnect the USB cable and select 'File Transfer' (MTP) mode.
- Restart the ADB server:
adb kill-server adb start-server - Install drivers (for Windows—from the device manufacturer's site or via Google USB Driver).
Uninstalled App Restored After Reboot
Cause: You disabled the app for the current user (--user 0) but did not remove it physically. It will return after a system update or factory reset.
Solution:
- For permanent removal, root access is required.
- Alternatively, use specialized debloating tools (e.g.,
adb shell pm hideon Android 10+).
Cannot Find the Package Name
Cause: The app may have a different name than what is visible in the interface.
Solution:
- Use
adb shell pm list packages -3to list only user-installed apps. - Or install the App Inspector app from the Play Store and view the package name in its interface.
Permission Denied Error
Cause: The command is executed without administrator/superuser privileges.
Solution:
- On Windows: run the command prompt as Administrator.
- On Linux/macOS: use
sudobeforeadb(if required). - For system commands (
pm uninstall) without--user 0orsu, root access is needed.
Conclusion
You now know how to uninstall apps on Android via ADB. This method gives you full control over the device, but requires caution—especially when working with system components. Always verify the package name and be aware of the consequences of removing system apps. For regular debloating, consider using scripts or specialized tools, but the basic ADB commands remain a universal solution.