How to get drush to list ONLY parent folders on module list command? I use this command to get a list of contrib enabled modules:

drush pm-list --type=module --status=enabled --no-core --format=list


Problem is, it also lists submodules, for example:

admin_menu
admin_menu_toolbar


So if I use this to reinstall the modules on another site:

Drush dl admin_menu admin_menu_toolbar


It causes errors. So I need to drush only:

Drush dl admin_menu


So how can I get the list of ONLY parent modules?

My goal is to get drush to display list of modules on the source site, but only folder names, not subfolders
You are looking for the pm-projectinfo command.  See: http://drushcommands.com/drush-8x/pm/pm-projectinfo/

In Drupal, "projects" contain "extensions". An "extension" can be either a module or a theme.  drush pm-list will show a list of modules and themes; drush pm-projectinfo shows a list of projects.

UPDATE: If you want to convert an existing site into a reproducible, buildable script, you might also be interested in using Composer.  See https://github.com/drupal-composer/drupal-project and https://www.drupal.org/project/composer_generate