ios_file_delete
Delete a file or directory tree on an iOS device. Directories are removed recursively. Same bundleId root selection as ios_file_list — the usual use is clearing an app's cached state between test runs. Returns deleted (true when everything went) plus failed, the paths that could not be removed. Set force to continue past individual failures instead of stopping at the first. This is destructive and has no undo. Camera photos and videos, their folders, and the on-device media databases are REFUSED: deleting one removes the file while the photo library keeps its record of it, leaving that library pointing at something that no longer exists. Files you pushed yourself are always deletable, including ones you put in the camera folder.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| udid | Yes | iOS device UDID | |
| force | No | Continue past individual failures and report them (default false) | |
| bundleId | No | Bundle id of an app whose OWN container to browse (Documents/, Library/, tmp/) — the files the app itself reads and writes. Omit to use the shared media directory (photos, downloads) instead. Only apps built for testing expose a container; store-installed apps cannot. | |
| remotePath | Yes | Absolute path of the file or directory to delete |