How to delete a content type, programmatically? I programmatically created a content type during a module installation (using field storage configuration).

I want to delete that content type while uninstalling the module.

Is there any way to do this with Drupal 8?
Just make sure that the node type depends on your your module, then Drupal will delete it automatically for you.

See node.type.book.yml in the book module for an example, this is the relevant part:

dependencies:
  enforced:
    module:
      - book


Note that users will have to delete all content of that type before they can uninstall the module then.