How to remove all MSI modules in Magento 2?

Multi-source Inventory is a new concept launched by Magento from Magento 2.3.* Version.

Earlier version (Before Magento 2.3) of Magento doesn’t support MSI feature.

MSI is used for multi-source concept used for inventory management at a single or multiple source location.

When you use Magento order management(MOM) in your site with Magento 2.3.*, You must need to remove all the MSI module from the code to use features of Magento Order Management.

You can simply remove all the MSI module using composer.json by below way in replace object of JSON,

"replace": {
    "magento/module-inventory": "*",
    "magento/module-inventory-admin-ui": "*",
    "magento/module-inventory-api": "*",
    "magento/module-inventory-bundle-product": "*",
    "magento/module-inventory-bundle-product-admin-ui": "*",
    "magento/module-inventory-cache": "*",
    "magento/module-inventory-catalog": "*",
    "magento/module-inventory-catalog-admin-ui": "*",
    "magento/module-inventory-catalog-api": "*",
    "magento/module-inventory-catalog-search": "*",
    "magento/module-inventory-configurable-product": "*",
    "magento/module-inventory-configurable-product-admin-ui": "*",
    "magento/module-inventory-configurable-product-indexer": "*",
    "magento/module-inventory-configuration": "*",
    "magento/module-inventory-configuration-api": "*",
    "magento/module-inventory-distance-based-source-selection": "*",
    "magento/module-inventory-distance-based-source-selection-admin-ui": "*",
    "magento/module-inventory-distance-based-source-selection-api": "*",
    "magento/module-inventory-elasticsearch": "*",
    "magento/module-inventory-grouped-product": "*",
    "magento/module-inventory-grouped-product-admin-ui": "*",
    "magento/module-inventory-grouped-product-indexer": "*",
    "magento/module-inventory-import-export": "*",
    "magento/module-inventory-indexer": "*",
    "magento/module-inventory-low-quantity-notification": "*",
    "magento/module-inventory-low-quantity-notification-admin-ui": "*",
    "magento/module-inventory-low-quantity-notification-api": "*",
    "magento/module-inventory-multi-dimensional-indexer-api": "*",
    "magento/module-inventory-product-alert": "*",
    "magento/module-inventory-reservations": "*",
    "magento/module-inventory-reservations-api": "*",
    "magento/module-inventory-sales": "*",
    "magento/module-inventory-sales-admin-ui": "*",
    "magento/module-inventory-sales-api": "*",
    "magento/module-inventory-sales-frontend-ui": "*",
    "magento/module-inventory-setup-fixture-generator": "*",
    "magento/module-inventory-shipping": "*",
    "magento/module-inventory-shipping-admin-ui": "*",
    "magento/module-inventory-source-deduction-api": "*",
    "magento/module-inventory-source-selection": "*",
    "magento/module-inventory-source-selection-api": "*",
    "magento/module-inventory-export-stock": "*",
    "magento/module-inventory-export-stock-api": "*",
    "magento/module-inventory-reservation-cli": "*",
    "magento/module-inventory-graph-ql": "*"
}

You have to add above data in your Magento root composer.json file with replace the object.

Run command from Magento SSH,

composer update

Your all the inventory module will be removed from the core code after composer update.
Run php bin/magento setup:upgrade and php bin/magento cache:clean