title: how to clear out garbage tables from broken mongodb shard
body: <p>I am trying to remove the remains of some data from a shard that proved to
  be too slow to be useful.   Some programming error produced a bunch of databases which have bogus names:</p>
  
  <pre><code>mongos&gt; db.runCommand( { removeShard: "shard0002" }); 
  {
      "msg" : "draining ongoing",
      "state" : "ongoing",
      "remaining" : {
              "chunks" : NumberLong(0),
              "dbs" : NumberLong(30)
      },
      "note" : "you need to drop or movePrimary these databases",
      "dbsToMove" : [
              "*�\u000f",
              "M�\u0006",
              "ed_tione_tr�\u0002",
              "sns�\u0002",
              "sns�\u0002",
              "sns�\u0002",
              "sns�\u0002",
              "sns�\u0002",
              "sns�\u0002",
              "sn�\u0002",
              "sn�\u0002",
              "sn�\u0002",
              "sn�\u0002",
              "sn�\u0002",
              "sn�\u0002",
              "sn�\u0002",
              "s�\u0002",
              "s�\u0002",
              "�\u0002",
              "�\u0003",
              "�\u0006",
              "�%\u0003",
              "��\r",
              "�\u0007",
              "�\u0002",
              "�\u0002",
              "�\u0002",
              "�\u0002",
              "�\u0002",
              "�\f"
      ],
      "ok" : 1
  }
  </code></pre>
  
  <p>I access the names, which I can't really type:</p>
  
  <pre><code>mongos&gt; var k = db.runCommand( { removeShard: "shard0002" });
  mongos&gt; var n = k.dbsToMove
  </code></pre>
  
  <p>but, even this doesn't help me:</p>
  
  <pre><code>mongos&gt; db.adminCommand({ movePrimary: n[10],to : "shard0001" });
  { "ok" : 0, "errmsg" : "can't find db!" }
  </code></pre>
  
  <p>I'm running mongodb 2.6.7, and getting rid of this useless shard is one thing
  keeping from easily upgrading.</p>