How to import an SQL file and COMPLETELY erase the previous one I'm having a hard time with buggy modules and need to do a lot of installs, uninstalls and so on.

But even if I uninstall, the modules leave data on the SQL file, and the only way to start from scratch is a new install every time...

How can I save SQL files that will delete ALL older data when imported?

An fresh SQL file that doesn't contain any data of newly installed and uninstalled modules.

I've tried add drop dables and other settings, but it seems that once you install a module...it's too late..it keeps creeping back into the database, sometimes form dependencies also?
You can use drush:

drush sql-drop; drush sqlc &lt; path/to/sql/dump/file.sql


Understand it will drop your entire Drupal db and the second command will rebuild it from your dump file.

You can create a base dump from:

drush sql-dump &gt; path/to/save/dump.sql


Here's the link to the drush commands website, select sql from the menu on the left drush commands