Drupal Installation modules leftovers cleanup
While I personally keep and eye on module listing page and make list of modules to be uninstalled at the time of going live, usually the 'To Uninstall' list contains some UI wrapper modules like views_ui, devel, etc. But searching for any contrib module I came across unused_modules, I think it might be worth trying what this module gives out of the box.


How do you remove folders that are not needed anymore from the sites/all/modules folder?
https://www.drupal.org/project/unused_modules
How do you remove leftover database tables?

You can you schema module, which basically identifies tables and modules relation and also list down orphan tables, this can give you a list of tables which might be just left over tables.
Cleanup test data content.

delete_all module seems to allow to cleanup the test content with different variation via drush.