Delete Invoice In magento 2

/* Script delete invoice  */
DELETE FROM sales_invoice WHERE entity_id = $invoice_id;
DELETE FROM sales_invoice_grid WHERE increment_id = "000000169";

/* Script delete invoice  */
UPDATE sales_order
SET state = "new", status = "pending", 
base_discount_invoiced = 0, based_shipping_invoiced = 0, base_subtotal_invoiced = 0, base_tax_invoiced = 0, base_total_invoiced = 0, base_total_invoiced_cost = 0, discount_invoiced = 0, shipping_invoiced = 0, subtotal_invoiced = 0, total_invoiced = 0, discount_tax_compensation_invoiced = 0, base_discount_tax_compensation_invoiced = 0, base_aw_giftcard_invoiced = 0,
aw_giftcard_invoiced = NULL, base_aw_reward_points_invoiced = NULL, aw_reward_points_invoiced = NULL, aw_reward_points_blnce_invoiced = NULL, base_aw_store_credit_invoiced = NULL, aw_store_credit_invoiced = NULL
WHERE entity_id = $order_id;


UPDATE sales_order_item
SET qty_invoiced = 0, qty_shipped = 0, tax_invoiced = 0, base_tax_invoiced = 0, discount_invoiced = 0, base_discount_invoiced = 0, row_invoiced = 0, base_row_invoiced = 0, discount_tax_compensation_invoiced = 0, base_discount_tax_compensation_invoiced = 0,
base_aw_reward_points_invoiced = NULL, aw_reward_points_invoiced = NULL, aw_reward_points_blnce_invoiced = NULL, ud_base_tax_amount = NULL, ud_base_hidden_tax_amount = NULL, ud_base_discount_amount = NULL, qty_canceled = 0
WHERE order_id = $order_id;