title: How to delete non-system apps from android using adb?
body: <p>I am trying to write a script to clean up android devices before some automated tasks. So I'm looking for some way to remove all the non-system apps from the phone, using adb, as I continuously find that people love installing heavy games on those devices. (These are our work devices) :D I couldn't find anything useful till now, as most questions I found were about deleting the system apps.</p>
  
  <p>I am able to list all the installed apps using adb</p>
  
  <pre><code>adb -s &lt;device id&gt; shell pm list packages -f | cut -d '=' -f 2 
  </code></pre>
  
  <p>But that gives all the apps that are installed, including some of these:</p>
  
  <pre><code>com.android.backupconfirm
  com.android.packageinstaller
  com.android.providers.userdictionary
  com.android.providers.downloads.ui
  com.android.externalstorage
  com.google.android.nfcprovision
  com.google.android.apps.docs.editors.docs
  com.google.android.apps.cloudprint
  </code></pre>
  
  <p>I'm afraid, if I accidentally uninstall them, the phone will become useless.
  Can someone suggest a way to delete only the applications installed by others ?</p>