That is not different from third-party modules that aren't installed. If for any reason, the module cannot be installed because its tables are already present in the database, you need to manually delete its database tables, and then try installing the module again.
You say you need to enable the module, but its database tables are only created when the module is being installed. When modules are already installed, and they are re-enabled, Drupal doesn't try to create its database tables.
To delete the database tables created from the module, you can use the following script. Save it in the same directory containing the index.php file used Drupal, execute cd
to make that directory the current directory, and run it.
define('DRUPAL_ROOT', getcwd());
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
$file = DRUPAL_ROOT . '/modules/aggregator/aggregator.install'
if (is_file($file)) {
require_once $file;
// Make sure the installation API is available
include_once DRUPAL_ROOT . '/includes/install.inc';
// Get the schema from the module.
$schema = call_user_func_array('aggregator_schema', array());
foreach ($schema as $table) {
if (db_table_exists($table['name'])) {
db_drop_table($table['name']);
}
}
}