title: (Programmatically/Automatically) Removing iOS-Apps
body: <p>I'm looking for a solution how to remove all installed iOS-Apps from a device. I'm working on a project for iOS-Security. For different analytical stuff on a jail-broken device it's necessary to automatically install a fat bunch of apps, perform all the tests and remove them afterwards to get free space for further applications. The auto installation and test-logic is already done. I only stuck with the apps-removing part.</p>
  
  <p>User installed iOS-Apps are located in <code>/var/mobile/Applications/</code>.
  Each application has its own randomly named directory e.g. <code>7654BE30-F438-42CE-98E0-B95264458C49/</code>.</p>
  
  <p>To proof whether an application is already installed or not my software checks out the <code>com.apple.mobile.installation.plist</code> in <code>/private/var/mobile/Library/Caches/</code></p>
  
  <p><strong>I've tried</strong> to remove the binaries of all applications in <code>/var/mobile/Applications/</code> and there references in the <code>com.apple.mobile.installation.plist</code>. It seems like the iOS generates a new <code>com.apple.mobile.installation.plist</code> after each installation-process, so it makes no difference whether I remove all the entries out of <code>com.apple.mobile.installation.plist</code> or not. So if I would like to install an application which was already tested someday my software wouln't recognize that it's not installed yet, because it's still listed in <code>com.apple.mobile.installation.plist</code>.</p>
  
  <p>I try to find out where the iOS stores all the information about a user installed application. Would appreciate any help or hint to find out the information. Thanks in advance!</p>
  
  <p>Consider I'm working with an jailbroken iDevice, so everything is possible ;-)</p>