How to delete CMS Page by Id programmatically in Magento 2?

You can delete CMS Page by Page id in Magento 2 using PageRepositoryInterface interface.

Magento\Cms\Api\PageRepositoryInterface interface is responsible for delete a CMS page from admin panel.

You just need to inject interface in your constructor to delete CMS page.

You just have to pass CMS page id in deleteCmsPage(1) function to delete specific CMS Page.