I have two Drupal environments with the same system.site:uuid

In the main Drupal I export the configuration with command:

drush config-export deploy -y

In the destination drupal I import the configuration with command:

drush config-import deploy -y

But I have this error

Entities exist of type Shortcut link and Default. These entities need to be deleted before importing.


Unable to install the mytest theme since it does not exist.

My test was a test for create subtheme, but then I delete mytest form drupal. And I don't know what it exports now, and, placeholder I don't Know what is it

I followed this article And I have the same issue of this comment

6 Answers 6


Sounds like you deleted your test theme without uninstalling it. You either have to properly uninstall it, which might not be possible when it's not there or edit the core.extension.yml file in your exported config and remove it by hand.

About the other error, it looks like you are either really deleting shortcut/menu link types or, more likely, you manually "fixed" the system.site UUID. That check and UUID exists for a reason, just changing it to the same value on two different installations will do a lot of unexpected things. You would have to update lots of other UUID's too, otherwise Drupal will delete and re-create pretty much every single configuration entity in your system. Due to the changed UUID, it assumes you deleted and re-created it, so that's what it is trying to do.

And since it prevents you from deleting bundle config entity types when there is still content for that type/bundle, it gives you that error.

What is it that you are trying to do exactly? Maybe you're looking for Config Installer instead?

  • thanks for your reply. I have SiteA with fresh installation. Export my configuration with drush config-export deploy -y get my uuid with drush cget system.site uuid. In my SiteB I have the clone of siteA Change uuid with drush cedit shortcut.set.default and set the same of siteA. When I do drush config-export deploy -y I have an errore of placeholder. I follow this tutorial (dcycleproject.org/blog/68/…) and change uuid by module, but I have the same result
    – monkeyUser
    Commented Dec 20, 2015 at 14:32


Entities exist of type Shortcut link and Default. These entities need to be deleted before importing.

You need delete the entities of type short-cut, you can do with drush:

drush ev '\Drupal::entityManager()->getStorage("shortcut_set")->load("default")->delete();'
  • When I try this, I get this error: bash: -c: line 0: syntax error near unexpected token ('` I'm not sure if it's because I am running drush from within ddev - my full command is: ddev drush ev '\Drupal::entityManager()->getStorage("shortcut_set")->load("default")->delete(); Commented Jan 23, 2020 at 23:24
  • The above issue can be addressed by running drush on the host, instead: github.com/drud/ddev/issues/1648#issuecomment-502757303 Because now, for a composer-based Drupal 8+ project, drush can be installed for the project using composer require drush/drush and you can create a short cut by doing this: cd web (your docroot), then ` ln -s ../vendor/drush/drush/drush .` This assumes that your source tree is 2 levels, with the site docroot in web and composer.json, .git folder etc above that by one level. Commented Jan 24, 2020 at 16:44
  • With drush setup locally as above, then the command can be issued thus: ./drush ev '\Drupal::entityManager()->getStorage("shortcut_set")->load("default")->delete();' Note the ./ preceding the command. Commented Jan 24, 2020 at 16:47
  • The above solution would not actually work for me whereby I'm running drush on the host, because the database not accessible from the host as it's associated with a docker container with ddev. So you have to actually use ddev. The way to solve the ddev issue with the bash is to escape all of the characters that could cause the issue: ddev drush ev \'\\Drupal\:\:entityManager\(\)\-\>getStorage\(\"shortcut_set\"\)\-\>load\(\"default\"\)\-\>delete\(\)\;\'- I found this actually works! I'm prefixing any special character with a backslash to "escape" it. Commented May 31, 2020 at 22:24
  • 1
    "entityManager" has been replaced by "entityTypeManager" in Drupal 9+ drush ev '\Drupal::entityTypeManager()->getStorage("shortcut_set")->load("default")->delete();' api.drupal.org/api/drupal/core%21lib%21Drupal.php/function/…
    – knice
    Commented Jan 31, 2023 at 21:49

About the first error (Entities exist of type Shortcut link and Default. These entities need to be deleted before importing.):

I went to Home > Administration > Configuration > User interface > Shortcuts (admin/config/user-interface/shortcut), than in "List links" of "Default" I deleted every shortcut.

The error is gone now.


Whenever you get this type of error, you need to delete the entities first.

Here's a generic Drush command that will delete any entity type, unlike another answer here. Just set the machine name in the first PHP command.

drush @site eval '$entity_type = "my_entity_type"; $storage_handler = \Drupal::entityTypeManager()->getStorage($entity_type); $storage_handler->delete($storage_handler->loadMultiple(\Drupal::entityQuery($entity_type)->execute()));'

  • This should be a drush command, it would come in handy
    – wranvaud
    Commented Feb 15, 2022 at 13:48

An easy way using drush nowadays: drush edel [entity_type] --bundle=[bundle_name]

drush edel shortcut_set --bundle=default

Using the answers above as a base the following worked for me:

To delete entities of a specific bundle, replace the first 2 values accordingly on the script and save it on a file.

$entity_type = "paragraph";
$type = "contact";

$storage_handler = \Drupal::entityTypeManager()->getStorage($entity_type);
$entities_to_delete = \Drupal::entityQuery($entity_type)
  ->condition('type', $type)->execute();

Then run drush php:script to-delete-entities.php

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.