This shouldn't be done regulary but it could happen you need it to fix some mess
drush eval "\$module_data = \Drupal::config('core.extension')->get('module'); unset(\$module_data['MODULE_NAME']); \Drupal::configFactory()->getEditable('core.extension')->set('module', \$module_data)->save();"
To check data in DB about modules you are using go to DB and in the row in the config table where name = "core.extension" check the BLOB column data. The data is a serialized PHP array.