How do I remove app from iOS 8 Simulator from command line?

Frank picture Frank · Oct 16, 2014 · Viewed 17.2k times · Source

I have an automation running in the iOS Simulator that I have to remove before another run. How do I remove the app from the iOS Simulator from the command line?

For each simulator device directory (located at ~/Library/Developer/CoreSimulator/Devices/*), I tried to delete ./data/Containers/Bundle/Application/ and ./data/Containers/Data/Application/.

Even when I tried to delete the app by long pressing the app in the Simulator (the app becomes jiggly) and click on the X button, the user defaults were not being cleared. I want the app state to be 100% clean.

I found a good solution to solve this problem.

Answer

Archana picture Archana · Dec 3, 2014

With Xcode 6.1, to uninstall an app, use the following command:

xcrun simctl uninstall booted com.example.apple-samplecode.UICatalog

where com.example.apple-samplecode.UICatalog is the bundle identifier of the application you wish to uninstall.