I ran drupal console generate:plugin:block and made a mistake. I'd like to run it again, but I get this error:

 'block' entity with ID 'my_block' already exists.

I've removed the source file that the command created, but this error still persists. I'm guessing the block was added to the site's actual configuration. How can I undo/overwrite it?

1 Answer 1


I think I found the answer myself:

 drupal config:delete active block.block.my_block

(For my specific case) Good luck finding the configuration name. There's no listing from the console. I had to export the whole damn thing to a directory and grep for it.

  • 3
    drupal debug:plugin | grep my_block is useful for future reference
    – Clive
    Apr 16, 2019 at 18:30
  • Thanks! I'll give that a try
    – jpt
    Apr 17, 2019 at 19:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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