Remove bloatware from Xiaomi devices

  1. Enable developer mode
  2. Enable USB debugging and USB debugging (Security settings)
  3. Download Platform Tools from Chrome Developers
  4. Unzip platform-tools folder and add it to your path
  5. List all devices available:
    adb devices
  6. List all packages installed:
    adb shell pm list packages
  7. Search for a specific package:
    adb shell pm list packages -f youtube
  8. Get only package names and sort the output:
    adb shell pm list packages | sed -e 's/.*://' | sort
  9. Remove the package:
    adb shell pm uninstall -k --user 0