With last beta version of Drupal 8, I have this error:

Error message Unable to install Nature Theme - Structure and configuration, block.block.kyna_block_aboutus, block.block.kyna_block_blog_more_content, block.block.kyna_block_navbar, block.block.kyna_block_user_login, block.block.kyna_block_user_menu_account, field.field.node.article.field_kyna_article_slideshow, field.field.node.kyna_folio.body, field.field.node.kyna_folio.field_kyna_folio_client, [...] image.style.kyna_image_medium, node.type.kyna_folio, system.menu.kyna-navbar, taxonomy.vocabulary.kyna_client, views.view.kyna_blog, views.view.kyna_folio, views.view.kyna_home already exist in active configuration.

Why can't I reinstall my module? I don't have this error with previous version of Drupal 8 when I try to install my module after an uninstall.

How share my site configuration (block, field, view, etc.) without this problem please?

  • Seems like the tables of the modules still exists in you DB...
    – Robin
    Feb 13, 2015 at 7:24

2 Answers 2


This is not so easy right now.

One way to do it is to put a forced dependency in those configurations, then they will be uninstalled together with a module. Core might even switch to doing that automatically, as I just discussed with @alexpott.

I'm not really sure how you are using that module. I have a feeling that is not what you want.

How share my site configuration (block, field, view, etc.) without this problem please ?

Share how? With whom? Multiple separate sites, or dev/staging/production of the same site?

If the second, then do not use a module for this. Use the configuration staging folder and the configuration sync API/UI, that is designed to deal with updated default configuration.

If the first, keep in mind that default configuration is only designed for one use case: Initial default configuration when a module is installed for the first time. Modules are not meant to be re-installled to install updated configuration, the only way to do it like that would be first remove all the configuration and then create it again. That will not work for things like fields, because you will lose your data.

  • I create a custom theme and I use my module for create the demo content (block, view, example of articles, etc.), I need to know how I can add all my demo contents on the drupal installation of an another user/site. It's a theme that I will sell on Themeforest.net. Feb 13, 2015 at 13:45
  • If it's just a demo module, then adding the enforced dependency to all those config entities is the right approach, so that they get removed when you uninstall the module. For the first time, you will have to re-install or delete them manually (e.g. by doing a config export, remove all mentioned files and import again).
    – Berdir
    Feb 13, 2015 at 16:54
  • By example: dependencies: module: - my_module_name on all my .yml files inside /config/install/ ? Feb 14, 2015 at 13:53
  • note: on Drupal 8 Beta 4, I don't have this problem, I can install/remove/install my module without problem when uuid line is commented inside all .yml files of my module. Feb 14, 2015 at 14:12
  • Beta4 silently ignored those files, if you would have tried to change them and re-install, it would not have imported the new versions. Now it explicitly fails. See github.com/md-systems/file_entity/commit/… for enforced dependency examples.
    – Berdir
    Feb 14, 2015 at 14:14

1 . Devel + Drush

Devel + Drush command for module re-installation :

drush devel-reinstall modulename

Drush alias for above command :

drush dre modulename
  1. Devel

If you don't have access to shell then you can re-install module in following manner.


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.