Delete Shipment by shipment id Magento 2.

You can delete the Specific Shipment data by shipment id in Magento 2.

Using Magento\Sales\Api\ShipmentRepositoryInterface interface, you need to use delete() method to delete shipment data from the shipment table.

You must first fetch the Shipment object by id and then pass the Shipment object as a parameter in delete() method to delete specific Shipment.

Output: Boolean