Delete node revision in Drupal 8+ programmatically

0
2331
Delete node revision in Drupal 8+
Delete node revision in Drupal 8+

If you cannot find a way to delete node revision in Drupal 8+ programmatically, take a look at this post, I will show you how to do that.

This is what you’re looking for:

\Drupal::entityTypeManager()->getStorage('node')->deleteRevision($revision_id);

That’s it, quick and simple!