LinuxCommandLibrary

adb-uninstall

Uninstall application from an Android device

TLDR

Uninstall a package

$ adb uninstall [com.example.app]
copy

Uninstall a package, but keep user data
$ adb uninstall -k [com.example.app]
copy

SYNOPSIS

adb uninstall package_name

PARAMETERS

package_name
    The fully qualified package name of the application to uninstall. This is the unique identifier for the application within the Android system. Example: com.example.application.

-k
    Keeps the data and cache directories around after package removal.

DESCRIPTION

The `adb uninstall` command is a part of the Android Debug Bridge (adb) tool. It is used to remove a specified application package from an Android device or emulator. The command connects to the device via adb and sends the appropriate uninstall request. The command requires the package name of the application to be uninstalled, typically in reverse domain name notation (e.g., com.example.myapp). Uninstalling an application removes all of its data, including user data, caches, and settings. Successful uninstallation will usually return a 'Success' message in the terminal. If the app is not installed, the command will typically fail and return a corresponding error message. Important: You need to have developer options enabled on your Android device and USB debugging authorized for the connected computer for adb commands to work correctly. Root privileges are generally not required to uninstall regular user applications, but they might be needed for uninstalling system apps.

CAVEATS

Uninstalling system applications may require root access or special permissions. Using `adb uninstall -k` only keeps the app's data directory, not the actual APK file.
Ensure the Android device is properly connected and authorized for adb to function correctly.

EXIT CODES

A successful uninstallation typically returns an exit code of 0. Non-zero exit codes indicate errors such as device not found, package not installed, or insufficient permissions.

HISTORY

The `adb` tool has been an integral part of the Android SDK since its early days. The `uninstall` command has been a core function for developers to manage applications on devices during development and testing. Over time, the tool has been refined and enhanced to support different Android versions and device configurations.

SEE ALSO

adb(1), adb install(1)

Copied to clipboard