---
name: uad-debloat
description: Remove preinstalled Android apps (bloatware) from a connected phone with uad-cli over adb, safely and repeatably. Load when the user asks to debloat a phone, clean vendor apps, repeat a previous removal list, or says "Наведи порядок на телефоне".
---

# UAD Debloat

**Call phrase:** "Наведи порядок на телефоне" — start the workflow below. The phrase authorises the cleanup, not skipping the dry run or the confirmation of the list.

## Requirements

- `uad` in `PATH` — the CLI from UAD-NG releases (`uad-cli-macos` or `uad-cli-linux`, renamed to `uad`).
- `adb` in `PATH`.
- The phone visible in `adb devices`: connected by USB, or over the network (`adb connect <ip>:5555`, on Android 11+ `adb pair` first).

## Workflow

1. `uad devices` — confirm the target. With several devices, ask for the serial and use `-d <serial>`.
2. `uad update` — refresh the package lists. On failure it falls back to the cached ones.
3. `uad list --removal recommended --state enabled` — candidates with the UAD descriptions.
4. Show the proposed list and wait for explicit confirmation.
5. `uad uninstall --dry-run <packages>` — show the output before touching anything.
6. `uad uninstall <packages>` — only after the user approves the dry run.
7. Append the removed packages to `~/.config/uad/removed.txt`, one per line, so the run can be repeated or rolled back.

## Safety

- `unsafe` packages: never, unless the user names them explicitly. `expert` also needs confirmation.
- Packages outside the UAD lists (`--list unlisted`): don't uninstall unless the user asks.
- Restore with `uad enable <package>`. If the phone no longer boots after a removal, the fallback is a factory reset — say that before removing anything from `expert` or `unsafe`.
- Report what was removed, what failed and the exact error (for example `Package is not installed for the current user`).
