πŸ“„ android-adb-app-uninstaller | home

Android ADB App Uninstaller

guest@techdiy:~$

Android ADB (Android Debug Bridge) to uninstall preinstalled apps from system

This script is for uninstalling any application from your Android device, even (mostly) those defaults don't want to come off. (de-bloat the device).

The script is interactive w/ fuzzing app search capabilities.

Before get started

⚠️ WARNING

This tool is for advanced users, please make sure you understand what this tool does before using. It can break your operating system !!

(Please, read the message at the end of this page).


On your Android device you need to:

πŸ‘£ Activate the Developer options

πŸ‘£ Enable USB debugging (from the "Developer options" menu)

On your computer:

πŸ‘£ Need to install:

1. adb tools (check in your distro's repository)

2. fzf package if not installed, for the fuzzing search functionality.

πŸ‘£ Create file adb-app-uninstaller.sh (can use the name you wish here)

adb-app-uninstaller.sh:
#!/bin/bash

# Check for dependencies
if ! command -v adb &> /dev/null; then
    echo "adb not found. Please install Android Platform Tools."
    exit 1
fi

if ! command -v fzf &> /dev/null; then
    echo "fzf not found. Please install it (e.g., 'sudo apt install fzf' or 'brew install fzf')."
    exit 1
fi

# Wait for device
echo "Waiting for device..."
adb wait-for-device

# Verify device is connected
if ! adb get-state | grep -q "device"; then
    echo "No device detected. Make sure USB debugging is enabled."
    exit 1
fi

while true; do
    echo -e "\nFetching all apps (user + system)..."
    mapfile -t packages < <(adb shell pm list packages | sed 's/package://')

    if [ ${#packages[@]} -eq 0 ]; then
        echo "No apps found."
        exit 0
    fi

    echo "Type to filter, press Enter to select, or Ctrl+C to quit."
    selected_pkg=$(printf "%s\n" "${packages[@]}" | fzf --prompt="Uninstall> ")
# Strip carriage return (and trailing spaces just in case)
	selected_pkg=$(echo "$selected_pkg" | tr -d '\r')

    if [ -z "$selected_pkg" ]; then
        echo "No package selected. Exiting."
        exit 0
    fi

    echo "You selected: $selected_pkg"
    read -p "Are you sure you want to uninstall it? (y/N): " confirm

    if [[ "$confirm" == "y" || "$confirm" == "Y" ]]; then
        adb shell pm uninstall --user 0 "$selected_pkg" && echo "Uninstalled $selected_pkg." || echo "Failed to uninstall $selected_pkg."
    else
        echo "Skipped."
    fi
done
	

πŸ‘£ Make the file executable:

chmod +x adb-app-uninstaller.sh

πŸ‘£ Connect the Android device to your PC via USB cable and check if it's visible with: adb devices command from terminal

πŸ‘£ Run the script


πŸ’‘ Notes:

If you are not sure about the app's full name you want to remove, you can install the app Apk info beforehand from Google store (the icon is a bright red circle with white APK in the middle)

⚠️ Disclaimer:

This script is provided as-is, without any warranties or guarantees of any kind. Use of this at your own risk.


🦊 Gitlab: See on Gitlab↗️