karagoz uninstall
Removes an app and its data.
- Android emulator Done
- Android device Done
- iOS simulator Done
- iOS device Done
karagoz uninstall <package> [--device <id>]Before you start
Section titled “Before you start”- On an iOS simulator: Xcode, opened once.
- On an iPhone: Xcode 15 or newer, paired with the Mac, Developer Mode on (Settings > Privacy & Security > Developer Mode).
Options
Section titled “Options”| Option | Default | Meaning |
|---|---|---|
<package> |
The package name. | |
--device <id> |
see Device selection |
Examples
Section titled “Examples”karagoz uninstall dev.karagoz.smoke{"device":"emulator-5554","package":"dev.karagoz.smoke"}exit 0Output
Section titled “Output”{ "device": "emulator-5554", "package": "dev.karagoz.smoke"}devicestring- Serial, or the simulator's or iPhone's UDID.
packagestring- The package name.
Errors
Section titled “Errors”| Code | When |
|---|---|
INVALID_ARGS | '<value>' is not a package name, as for launch. |
APP_NOT_FOUND | The package is not installed. Checked first, because Android answers a missing package with DELETE_FAILED_INTERNAL_ERROR, the same code it gives for a package it will not remove. |
UNINSTALL_FAILED | Android refused. The message is Android's Failure [...] line and reason its code, such as DELETE_FAILED_INTERNAL_ERROR for a system app with no updates. |
Every uninstall can also get the device selection errors and the adb errors.
- A system app with installed updates goes back to its factory version. Android reports that as success, and so does Karagöz.
- The app’s data is always removed;
adb uninstall -k(keep data) is not offered. - The app and its data go from every user on the device, Secure Folder and work profiles included. The installed check looks at the main user only, so an app installed only in a profile gives
APP_NOT_FOUND.
On an iOS simulator
Section titled “On an iOS simulator”Runs simctl uninstall.
{ "device": "2EC769C1-2EF2-47EB-A441-E6843968F039", "package": "dev.karagoz.probe"}-
A system app is refused before anything is sent, since a simulator can lose it until it is erased:
{"error": {"code": "UNINSTALL_FAILED","message": "'com.apple.Preferences' is a system app; a simulator does not remove system apps","reason": "SYSTEM_APP"}} -
A running app is killed first; the home screen then shows the page its icon was on.
-
APP_NOT_FOUNDwhen it is not installed: simctl reports success for a missing app, so Karagöz checks first. A refusal from simctl isUNINSTALL_FAILEDwith its<domain>:<code>asreason. -
An app stopped in a debugger ends the call in
SIMCTL_TIMEOUTafter 30 s, as withinstall. The app is removed once the debugger lets it run or the debug session ends.
On an iPhone
Section titled “On an iPhone”Runs devicectl device uninstall app.
- A system app such as Settings is refused before anything is sent:
UNINSTALL_FAILED,reasonSYSTEM_APP,'com.apple.Preferences' is a system app; an iPhone does not remove system apps. APP_NOT_FOUNDwhen it is not installed: devicectl reports success for a missing app, so Karagöz checks first. A refusal isUNINSTALL_FAILEDwith the phone’s<domain>:<code>asreason.- A running app, also one stopped in a debugger, is killed and removed. A locked iPhone removes too.
MCP equivalent
Section titled “MCP equivalent”Arguments: package (required), device. The names are the CLI's option and positional names.
Related commands
Section titled “Related commands”- karagoz launch
- Checks the package name the same way.