title: DB2 database directory shows DB that does not exist
body: <p>I have an old test database showing when I run <code>db2 list database directory</code></p>
  
  <pre><code>Database 8 entry:
  
   Database alias                       = TEST_AN
   Database name                        = TEST_AN
   Local database directory             = /home/users/db2inst
   Database release level               = d.00
   Comment                              =
   Directory entry type                 = Indirect
   Catalog database partition number    = 0
   Alternate server hostname            =
   Alternate server port number         =
  </code></pre>
  
  <p>But it is not there when I run <code>db2 list database directory on /home/users/db2inst</code></p>
  
  <p>I can't connect to it: </p>
  
  <pre><code>&gt; db2 connect to TEST_AN
  SQL1013N  The database alias name or database name "TEST_AN" could not be 
  found.  SQLSTATE=42705
  </code></pre>
  
  <p>or drop it:</p>
  
  <pre><code>&gt; db2 drop db TEST_AN
  SQL1013N  The database alias name or database name "TEST_AN  " could not be 
  found.  SQLSTATE=42705
  </code></pre>
  
  <p>And I can't create a new DB using that name:</p>
  
  <pre><code>&gt; db2 create database TEST_AN
  SQL1005N  The database alias "TEST_AN" already exists in either the local 
  database directory or system database directory.
  </code></pre>
  
  <p>Does anyone know what the problem is, how can I get rid of this db that does and does not exist?</p>