title: How to remove an offline emulator from avd devices?
body: <p>I've created a couple of AVD-s in Android Studio.  They were launching on emulator port 5554.  Then I've created another AVD via <code>android avd</code> application, and they are starting on port 5556.  </p>
  
  <p>Now with a single emulator running, I get the following output from <code>adb devices -l</code>:</p>
  
  <pre><code>List of devices attached
  emulator-5556          device
  emulator-5554          offline
  </code></pre>
  
  <p>I'm using the tooling which cannot supply the <code>-s</code> (specific device) option to <code>adb</code>, so when trying to install an app, I get an error:</p>
  
  <pre><code>error: more than one device/emulator
  </code></pre>
  
  <p>And I'd like that there be a single connected emulator: the only one that I'm running.</p>
  
  <p>I thought that removing the old Android Studio-created devices would do the trick of removing the emulator-5554, but nope.  Even new devices created in Studio will open on 5556.  So I've ended up with a forever-offline zombie <code>emulator-5554</code> that screws up my build tooling.</p>
  
  <p>How can I force the new emulators to be run on port 5554 and/or remove the offline <code>emulator-5554</code>?</p>
  
  <p>(Running Ubuntu 16.04 if it matters.)</p>