Device File Management

Remove a file from the device

Deletes a specific file from the device storage.

post/sessions/{sessionId}/device/removeFile

Request

Path parameters

sessionIdstring required

The id of the device session

Request body

pathstring required

The path of the file to remove.

bundleIdstring

The iOS app bundle identifier (e.g., com.example.app). Required for iOS devices, not needed for Android. On iOS, each app runs in its own sandbox — an isolated file system container that restricts access to only that app's data. This means you must specify which app's sandbox to operate on by providing its bundle ID. You can find the bundle ID in Xcode, in the app's Info.plist, or via the Sauce Labs app management API. See Apple's File System documentation for more details.

Example request

{
  "path": "/folder/test.txt",
  "bundleId": "com.example.app"
}

Response

File removed successfully

Changes

No recorded changes to this operation across all 1 revision of this API.