I'm trying to migrate and upgrade a site from Drupal 7 to Drupal 8 (version 8.9.1). The migration cannot be accomplished with the UI, since I need to make some changes to the content types and taxonomies during the process. I followed the advice at https://www.drupal.org/docs/upgrading-drupal/upgrade-using-drush and generated individual migrations using drush migrate-upgrade --configure-only so that I could use the YAML files it generates as the basis for a custom migration module.

After I built my module, I ran drush migrate-status (alias drush ms). I can see that my migrations are registered, but the ones generated earlier by drush migrate-upgrade are also there. In the past, removing them would be a simple matter of using drush migrate-deregister (alias drush mdreg), but that command, strangely, is no longer available in the current version of Drush (10.3.1).

How do I deregister the migrations that were generated by drush migrate-upgrade --configure-only? I am assuming that if I don't deregister them, my content will be migrated twice, and I don't want that to happen.

1 Answer 1


Those migrations are stored as configuration. When you run drush migrate-upgrade --configure-only the command created various migrate_plus.migration.* config data related to your D7 migration.

If you remove the config, you'll remove the migrations. For example:

  • If you have config captured in a sync directory, do a drush cex, remove all migrate_plus.migration.* yml files, then drush cim. Drush will drop all migration configuration on import.
  • If you'd rather delete the migration directly, drush cdel will let you specifically delete a migration.

Even if you delete the migration config, some migration metadata is still kept around in the database (see migrate_map_ & migrate_messages_ tables). They'll be re-used if you re-import migration config. If you're finally finished with your migrations, you can delete them.

  • Thank you, Shawn! That helps a lot! That information should really be added to the documentation at <drupal.org/docs/upgrading-drupal/upgrade-using-drush>.
    – sjhuskey
    Commented Jul 1, 2020 at 19:37
  • No prob. If you have a d.o. account, I believe you can make suggestions or edit to community documentation.
    – Shawn Conn
    Commented Jul 1, 2020 at 19:55
  • I'll edit it after I've successfully completed the migration. Thanks again for your excellent answer!
    – sjhuskey
    Commented Jul 2, 2020 at 12:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.