title: How to clean Django database after install and uninstall packages?
body: <p>I just learned that I should be more careful after installing any package in Django. This is I should dump my database (or simply copy the the database file) before migrating or syncdb it when I install a new plugin. </p>
  
  <p>Now, it is to late. I have installed and removed several packages (<code>pip install package</code> and <code>python manage.py migrate</code>) and I would like to clean or purge my database, so I get rid of tables and fields no longer used.</p>
  
  <p><em>Is there any way of search and/or remove fields and tables that are no longer in use by the <code>INSTALLED_APPS</code>?</em></p>
  
  <p>It seems possible to iterate over all the <code>INSTALLED_APPS models.py</code> files and compare them with the current state of the database. Another option would be to generate a completely new database and compare it with the old one.</p>