Error: Call to undefined method Drupal::entityManager() in eval() (line 1 of /var/www/html/vendor/drush/drush/src/Commands/core/PhpCommands.php(30)

This error comes from a deprecated class. Here is the fix:

Instead of

drush ev '\Drupal::entityManager()->getStorage("shortcut_set")->load("default")->delete();

use: 

drush ev '\Drupal::entityTypeManager()->getStorage("shortcut_set")->load("default")->delete()';

 

 

Saved you some valuable time?

Buy me a drink 🍺 to keep me motivated to create free content like this!