How to remove custom module provided entity instances by the time the module being uninstalled? I have the following use case: 


I have a custom module, which defines a custom entity type.
The custom entity type has some content in the database. 
Module needs to be uninstalled now, but it can't, since "There is content for the entity type" (which is true, there is content)
How to extend the uninstall process of the module to first remove all the content instances and then do the rest?


I tried hook_uninstall, but that didn't help. Any ideas?
Content can't be uninstalled by hand! (bigger project issue)
A potential duplicate. 

The short answer (as I can see), you CAN'T right now remove content by the time you uninstalling the module. That makes you (us) to do it in two steps:


Write a update_hook where you remove all the content of the custom entity
You uninstall the module. 
(drush cex, which removes the module from
    core.extension.yml)