How to delete paragraph when uninstalling the module? I have been creating the custom module which have the paragraph configuration, when installing the custom module, the paragraph config will be stored in the database and then It will be available in the paragraph types.(/custom_module/config/install)

When uninstalling the custom module, the paragraph types are not getting uninstalled. By Manually, I am deleting it after the uninstalled.

Is there any possible way to delete the paragraph types when uninstalling the custom module?

Because of this, we are unable to fix some issues

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_example_ch_hero_video_target_id' in 'where clause': SELECT 1 AS expression FROM {paragraph_revision__field_example_ch_hero_video} t WHERE field_example_ch_hero_video_target_id IS NOT NULL


I have replaced the hero video field with some other machine name. then I could not delete the paragraph or install the module.

Can anyone give some valuable advice?
Add this to the relevant config file(s) in config/install:

dependencies:
  enforced:
    module:
      - custom_module


That will force the config item(s) to be removed when the module is uninstalled.