Delete Stock by Stock Id Multi-source Inventory Magento 2.

You can Delete Stock by Stock Id in Multi-Source Inventory (MSI) Magento 2 programmatically by passing stock id only.

Delete the Stock data by Stock id. If the stock is not found do nothing.

Interface Used to delete stock, Magento\InventoryApi\Api\StockRepositoryInterface.

Method DeleteById($stockid) used to delete specific Stock from the MSI.

Call $this->deleteStock() method to delete specific stock from the MSI module.

Check the Stock is delete or not from the Magento Admin Panel Stock Grid.