Remove import instance from list using Migrate Tools module I'm trying to remove an rss reference of a migration. Once I put the yaml code into the Migrate module in the drupal admin interface, it creates a reference to that yaml code, but there is no one in the UI that I can see the reference. The Migrate Tools module gives me access to drush commands, but none of which could remove a reference.

Does anyone know how to delete a reference to an import?  I can see references through the command line using $ drush ms 

I searched but could only find using this, but it doesn't work.

$ drush php

&gt;&gt;&gt; Drupal::configFactory()-&gt;getEditable('migrate_plus.migration.my_rss_importer')-&gt;delete();


Here is the list of imports from the CLI I am trying to remove.  Just for reference "migrate_plus" mentioned in the code above is another module that compliments the migrate module.

Group: Default (default)      Status  Total  Imported  Unprocessed  Last imported
 berkeley_news_rss_importer_1  Idle    20     20        0            2017-12-09 23:08:36
 berkeley_news_rss_importer_2  Idle    20     20        0            2017-12-09 23:12:34
 berkeley_news_rss_importer_3  Idle    20     20        0            2017-12-09 23:14:03
 berkeley_news_rss_importer_4  Idle    20     20        0            2017-12-09 23:20:04
 berkeley_news_rss_importer_5  Idle    20     20        0            2017-12-09 23:33:17
 berkeley_news_rss_importer_6  Idle    20     20        0            2017-12-09 23:42:26
 berkeley_news_rss_importer_7  Idle    20     0         0            2017-12-10 00:11:17
 berkeley_news_rss_importer_8  Idle    20     20        0            2017-12-11 09:46:45
 berkeley_news_rss_importer_9  Idle    20     0         20
So you want to get rid of the migrations so that they don't appear in the drush ms output? Do this:

Removing imported content

Upon reading your question the second time, I thought you might even be asking "How to remove the content which is imported already?". If that is your question, then try drush migrate-rollback or drush mr for short. See documentation with drush mr --help.

Deleting the migrations


If you are using configuration management, then delete the relevant config YML files from the config sync directory and do drush cim. There should be files named migrate_plus.migration.MIGRATION_ID. It will ask for confirmation and if you say y, the relevant migrations will be deleted.
If you are not using configuration management, do drush config-list. Now, for every migration you want to delete, search for the name of the migration in the output of the config list and do a config-delete for it. Example: drush cdel migrate_plus.migration.MIGRATION_ID Consider using config management in the long run.


Deleting migration mappings


The migrate module might have created some mapping tables in the database to track your migrations. To delete these tables (I assume you know what you're doing), delete the mapping and messages tables for the migration. Example: DROP TABLE IF EXISTS migrate_map_MIGRATION_ID, migrate_messages_MIGRATION_ID. After you do this, you will never be able to do rollback.


Hope it helps.