How to delete Coupon data by Coupon id Magento 2?

Shopping cart Coupon deletes by coupon id in Magento 2 to get rid of all the expired coupons from the site.

Many of the coupons are created for specific events or some special days only like Black Friday or Cyber Monday after completed that day.

A client wants to delete all the expired ticket by coupon id, You can delete it safely with below code snippet.

Use deleteById() method to delete Coupon from the store.

if Coupon id found into the database table, delete it by id and gives result as true. Coupon Id is not found result will be false.

Output: Boolean value.