3

I want to disable all third-party modules and Magento's optional modules, for example, DHL, Klarna, Temando, Vertex, etc.

I disabled via admin panel and CLI

There is a different way to exclude them?

1
6

You can remove them via Composer.

You can install the Yireo module below to remove all optional native packages:

composer require yireo/magento2-replace-all

OR

You might be able to specify the packages to be removed in your composer.json and running composer update.

Examples

Remove all third-party core modules

"replace": {
    "amzn/amazon-pay-and-login-magento-2-module": "*",
    "amzn/amazon-pay-and-login-with-amazon-core-module": "*",
    "amzn/amazon-pay-module": "*",
    "amzn/amazon-pay-sdk-php": "*",
    "amzn/login-with-amazon-module": "*",
    "magento/module-braintree": "*",
    "magento/module-braintree-graph-ql": "*",
    "braintree/braintree_php": "*",
    "braintree/braintree": "*",
    "dotmailer/dotmailer-magento2-extension": "*",
    "dotmailer/dotmailer-magento2-extension-package": "*",
    "dotmailer/dotmailer-magento2-extension-enterprise": "*",
    "dotmailer/dotmailer-magento2-extension-enterprise-package": "*",
    "dotmailer/dotmailer-magento2-extension-chat": "*",
    "dotmailer/dotmailer-magento2-extension-b2b": "*",
    "dotmailer/dotmailer-magento2-extension-sms": "*",
    "klarna/m2-payments": "*",
    "klarna/module-core": "*",
    "klarna/module-kp": "*",
    "klarna/module-kp-graph-ql": "*",
    "klarna/module-ordermanagement": "*",
    "klarna/module-onsitemessaging": "*",
    "paypal/module-braintree": "*",
    "paypal/module-braintree-core": "*",
    "paypal/module-braintree-graph-ql": "*",
    "temando/module-shipping": "*",
    "temando/module-shipping-m2": "*",
    "temando/module-shipping-remover": "*",
    "vertex/product-magento-module": "*",
    "vertex/module-tax": "*",
    "vertex/sdk": "*",
    "vertexinc/module-tax-staging": "*",
    "vertexinc/product-magento-module": "*",
    "vertexinc/product-magento-module-commerce": "*",
    "vertex/module-address-validation": "*",
    "vertex/module-tax-staging": "*",
    "yotpo/magento2-module-yotpo-reviews": "*",
    "yotpo/magento2-module-yotpo-reviews-bundle": "*"
  },

Remove all optional core modules

"replace": {
        "amzn/amazon-pay-and-login-magento-2-module": "*",
        "amzn/amazon-pay-and-login-with-amazon-core-module": "*",
        "amzn/amazon-pay-module": "*",
        "amzn/amazon-pay-sdk-php": "*",
        "amzn/login-with-amazon-module": "*",
        "astock/stock-api-libphp": "*",
        "braintree/braintree": "*",
        "braintree/braintree_php": "*",
        "dotmailer/dotmailer-magento2-extension": "*",
        "dotmailer/dotmailer-magento2-extension-b2b": "*",
        "dotmailer/dotmailer-magento2-extension-chat": "*",
        "dotmailer/dotmailer-magento2-extension-enterprise": "*",
        "dotmailer/dotmailer-magento2-extension-enterprise-package": "*",
        "dotmailer/dotmailer-magento2-extension-package": "*",
        "dotmailer/dotmailer-magento2-extension-sms": "*",
        "klarna/m2-payments": "*",
        "klarna/module-core": "*",
        "klarna/module-kp": "*",
        "klarna/module-kp-graph-ql": "*",
        "klarna/module-onsitemessaging": "*",
        "klarna/module-ordermanagement": "*",
        "magento/adobe-stock-integration": "*",
        "magento/google-shopping-ads": "*",
        "magento/inventory-composer-installer": "*",
        "magento/inventory-composer-metapackage": "*",
        "magento/module-adobe-ims": "*",
        "magento/module-adobe-ims-api": "*",
        "magento/module-adobe-stock-admin-ui": "*",
        "magento/module-adobe-stock-asset": "*",
        "magento/module-adobe-stock-asset-api": "*",
        "magento/module-adobe-stock-client": "*",
        "magento/module-adobe-stock-client-api": "*",
        "magento/module-adobe-stock-image": "*",
        "magento/module-adobe-stock-image-admin-ui": "*",
        "magento/module-adobe-stock-image-api": "*",
        "magento/module-advanced-pricing-import-export": "*",
        "magento/module-amqp": "*",
        "magento/module-amqp-store": "*",
        "magento/module-analytics": "*",
        "magento/module-authorizenet": "*",
        "magento/module-authorizenet-acceptjs": "*",
        "magento/module-authorizenet-cardinal": "*",
        "magento/module-authorizenet-graph-ql": "*",
        "magento/module-braintree": "*",
        "magento/module-braintree-graph-ql": "*",
        "magento/module-bundle-graph-ql": "*",
        "magento/module-bundle-import-export": "*",
        "magento/module-bundle-import-export-staging": "*",
        "magento/module-bundle-sample-data": "*",
        "magento/module-bundle-staging": "*",
        "magento/module-cardinal-commerce": "*",
        "magento/module-catalog-analytics": "*",
        "magento/module-catalog-cms-graph-ql": "*",
        "magento/module-catalog-customer-graph-ql": "*",
        "magento/module-catalog-customer-ql": "*",
        "magento/module-catalog-graph-ql": "*",
        "magento/module-catalog-import-export-staging": "*",
        "magento/module-catalog-inventory-graph-ql": "*",
        "magento/module-catalog-inventory-staging": "*",
        "magento/module-catalog-page-builder-analytics-staging": "*",
        "magento/module-catalog-permissions-graph-ql": "*",
        "magento/module-catalog-rule-graph-ql": "*",
        "magento/module-catalog-rule-sample-data": "*",
        "magento/module-catalog-rule-staging": "*",
        "magento/module-catalog-sample-data": "*",
        "magento/module-catalog-staging": "*",
        "magento/module-catalog-staging-graph-ql": "*",
        "magento/module-catalog-staging-page-builder": "*",
        "magento/module-catalog-url-rewrite-graph-ql": "*",
        "magento/module-catalog-url-rewrite-staging": "*",
        "magento/module-checkout-agreements-graph-ql": "*",
        "magento/module-checkout-staging": "*",
        "magento/module-cms-graph-ql": "*",
        "magento/module-cms-page-builder-analytics-staging": "*",
        "magento/module-cms-sample-data": "*",
        "magento/module-cms-staging": "*",
        "magento/module-cms-url-rewrite-graph-ql": "*",
        "magento/module-compare-list-graph-ql": "*",
        "magento/module-configurable-product-graph-ql": "*",
        "magento/module-configurable-product-staging": "*",
        "magento/module-configurable-sample-data": "*",
        "magento/module-customer-analytics": "*",
        "magento/module-customer-balance-graph-ql": "*",
        "magento/module-customer-downloadable-graph-ql": "*",
        "magento/module-customer-finance": "*",
        "magento/module-customer-graph-ql": "*",
        "magento/module-customer-import-export": "*",
        "magento/module-customer-sample-data": "*",
        "magento/module-cybersource": "*",
        "magento/module-dhl": "*",
        "magento/module-directory-graph-ql": "*",
        "magento/module-downloadable-graph-ql": "*",
        "magento/module-downloadable-import-export": "*",
        "magento/module-downloadable-sample-data": "*",
        "magento/module-downloadable-staging": "*",
        "magento/module-eav-graph-ql": "*",
        "magento/module-eway": "*",
        "magento/module-fedex": "*",
        "magento/module-gift-card-account-graph-ql": "*",
        "magento/module-gift-card-graph-ql": "*",
        "magento/module-gift-card-staging": "*",
        "magento/module-gift-message-graph-ql": "*",
        "magento/module-gift-message-staging": "*",
        "magento/module-gift-wrapping-graph-ql": "*",
        "magento/module-gift-wrapping-staging": "*",
        "magento/module-google-adwords": "*",
        "magento/module-google-optimizer": "*",
        "magento/module-google-optimizer-staging": "*",
        "magento/module-graph-ql": "*",
        "magento/module-graph-ql-cache": "*",
        "magento/module-grouped-import-export": "*",
        "magento/module-grouped-product-graph-ql": "*",
        "magento/module-grouped-product-sample-data": "*",
        "magento/module-grouped-product-staging": "*",
        "magento/module-inventory": "*",
        "magento/module-inventory-admin-ui": "*",
        "magento/module-inventory-advanced-checkout": "*",
        "magento/module-inventory-api": "*",
        "magento/module-inventory-bundle-import-export": "*",
        "magento/module-inventory-bundle-product": "*",
        "magento/module-inventory-bundle-product-admin-ui": "*",
        "magento/module-inventory-bundle-product-indexer": "*",
        "magento/module-inventory-cache": "*",
        "magento/module-inventory-catalog": "*",
        "magento/module-inventory-catalog-admin-ui": "*",
        "magento/module-inventory-catalog-api": "*",
        "magento/module-inventory-catalog-frontend-ui": "*",
        "magento/module-inventory-catalog-search": "*",
        "magento/module-inventory-catalog-search-bundle-product": "*",
        "magento/module-inventory-catalog-search-configurable-product": "*",
        "magento/module-inventory-configurable-product": "*",
        "magento/module-inventory-configurable-product-admin-ui": "*",
        "magento/module-inventory-configurable-product-frontend-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-export-stock": "*",
        "magento/module-inventory-export-stock-api": "*",
        "magento/module-inventory-graph-ql": "*",
        "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-in-store-pickup": "*",
        "magento/module-inventory-in-store-pickup-admin-ui": "*",
        "magento/module-inventory-in-store-pickup-api": "*",
        "magento/module-inventory-in-store-pickup-frontend": "*",
        "magento/module-inventory-in-store-pickup-graph-ql": "*",
        "magento/module-inventory-in-store-pickup-multishipping": "*",
        "magento/module-inventory-in-store-pickup-quote": "*",
        "magento/module-inventory-in-store-pickup-quote-graph-ql": "*",
        "magento/module-inventory-in-store-pickup-sales": "*",
        "magento/module-inventory-in-store-pickup-sales-admin-ui": "*",
        "magento/module-inventory-in-store-pickup-sales-api": "*",
        "magento/module-inventory-in-store-pickup-shipping": "*",
        "magento/module-inventory-in-store-pickup-shipping-admin-ui": "*",
        "magento/module-inventory-in-store-pickup-shipping-api": "*",
        "magento/module-inventory-in-store-pickup-webapi-extension": "*",
        "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-quote-graph-ql": "*",
        "magento/module-inventory-requisition-list": "*",
        "magento/module-inventory-reservation-cli": "*",
        "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-swatches-frontend-ui": "*",
        "magento/module-inventory-visual-merchandiser": "*",
        "magento/module-inventory-wishlist": "*",
        "magento/module-layered-navigation-staging": "*",
        "magento/module-login-as-customer-graph-ql": "*",
        "magento/module-marketplace": "*",
        "magento/module-msrp-sample-data": "*",
        "magento/module-msrp-staging": "*",
        "magento/module-multiple-wishlist-graph-ql": "*",
        "magento/module-multishipping": "*",
        "magento/module-new-relic-reporting": "*",
        "magento/module-newsletter-graph-ql": "*",
        "magento/module-offline-shipping-sample-data": "*",
        "magento/module-page-builder-analytics": "*",
        "magento/module-payment-staging": "*",
        "magento/module-paypal-graph-ql": "*",
        "magento/module-product-links-sample-data": "*",
        "magento/module-product-video-staging": "*",
        "magento/module-quote-analytics": "*",
        "magento/module-quote-graph-ql": "*",
        "magento/module-re-captcha-webapi-graph-ql": "*",
        "magento/module-related-product-graph-ql": "*",
        "magento/module-review-analytics": "*",
        "magento/module-review-graph-ql": "*",
        "magento/module-review-sample-data": "*",
        "magento/module-review-staging": "*",
        "magento/module-reward-graph-ql": "*",
        "magento/module-reward-staging": "*",
        "magento/module-rma-graph-ql": "*",
        "magento/module-rma-staging": "*",
        "magento/module-sales-analytics": "*",
        "magento/module-sales-graph-ql": "*",
        "magento/module-sales-rule-sample-data": "*",
        "magento/module-sales-rule-staging": "*",
        "magento/module-sales-sample-data": "*",
        "magento/module-sample-data": "*",
        "magento/module-search-staging": "*",
        "magento/module-send-friend": "*",
        "magento/module-send-friend-graph-ql": "*",
        "magento/module-signifyd": "*",
        "magento/module-staging": "*",
        "magento/module-staging-graph-ql": "*",
        "magento/module-staging-page-builder": "*",
        "magento/module-store-graph-ql": "*",
        "magento/module-swagger": "*",
        "magento/module-swagger-webapi": "*",
        "magento/module-swagger-webapi-async": "*",
        "magento/module-swatches-graph-ql": "*",
        "magento/module-swatches-sample-data": "*",
        "magento/module-target-rule-graph-ql": "*",
        "magento/module-tax-graph-ql": "*",
        "magento/module-tax-import-export": "*",
        "magento/module-tax-sample-data": "*",
        "magento/module-theme-graph-ql": "*",
        "magento/module-theme-sample-data": "*",
        "magento/module-ups": "*",
        "magento/module-url-rewrite-graph-ql": "*",
        "magento/module-usps": "*",
        "magento/module-vault-graph-ql": "*",
        "magento/module-version": "*",
        "magento/module-versions-cms-url-rewrite-graph-ql": "*",
        "magento/module-weee-graph-ql": "*",
        "magento/module-weee-staging": "*",
        "magento/module-widget-sample-data": "*",
        "magento/module-wishlist-analytics": "*",
        "magento/module-wishlist-graph-ql": "*",
        "magento/module-wishlist-sample-data": "*",
        "magento/module-worldpay": "*",
        "magento/sample-data-media": "*",
        "paypal/module-braintree": "*",
        "paypal/module-braintree-core": "*",
        "paypal/module-braintree-graph-ql": "*",
        "temando/module-shipping": "*",
        "temando/module-shipping-m2": "*",
        "temando/module-shipping-remover": "*",
        "vertex/module-address-validation": "*",
        "vertex/module-tax": "*",
        "vertex/module-tax-staging": "*",
        "vertex/product-magento-module": "*",
        "vertex/sdk": "*",
        "vertexinc/module-tax-staging": "*",
        "vertexinc/product-magento-module": "*",
        "vertexinc/product-magento-module-commerce": "*",
        "yotpo/magento2-module-yotpo-reviews": "*",
        "yotpo/magento2-module-yotpo-reviews-bundle": "*"
    },
1

On my travels I've come across ths blog post

https://www.integer-net.com/make-magento-2-small-again/

But it makes sense what's been disabled

I haven't had the courage to do the full list but certainly I've removed the third party extensions from this list

Mage 2.3.1

"replace": {
        "magento/module-dhl": "*",
        "magento/module-fedex": "*",
        "magento/module-marketplace": "*",
        "magento/module-multishipping": "*",
        "magento/module-captcha": "*",
        "magento/module-persistent": "*",
        "magento/module-catalog-rule-configurable": "*",
        "magento/module-authorizenet": "*",
        "magento/module-google-adwords": "*",
        "magento/module-sample-data": "*",
        "magento/module-send-friend": "*",
        "magento/module-swagger": "*",
        "magento/module-swagger-webapi": "*",
        "magento/module-swagger-webapi-async": "*",
        "magento/module-swatches": "*",
        "magento/module-swatches-layered-navigation": "*",
        "magento/module-google-optimizer": "*",
        "magento/module-ups": "*",
        "magento/module-usps": "*",
        "magento/module-braintree": "*",
        "magento/module-signifyd": "*",
        "magento/module-release-notification": "*",
        "magento/module-new-relic-reporting": "*",
        "magento/module-version": "*",

        "magento/module-analytics": "*",
        "magento/module-catalog-analytics": "*",
        "magento/module-customer-analytics": "*",
        "magento/module-quote-analytics": "*",
        "magento/module-review-analytics": "*",
        "magento/module-sales-analytics": "*",
        "magento/module-wishlist-analytics": "*",

        "magento/module-bundle-graph-ql": "*",
        "magento/module-catalog-graph-ql": "*",
        "magento/module-catalog-inventory-graph-ql": "*",
        "magento/module-catalog-url-rewrite-graph-ql": "*",
        "magento/module-cms-graph-ql": "*",
        "magento/module-cms-url-rewrite-graph-ql": "*",
        "magento/module-inventory-graph-ql": "*",
        "magento/module-configurable-product-graph-ql": "*",
        "magento/module-customer-graph-ql": "*",
        "magento/module-downloadable-graph-ql": "*",
        "magento/module-eav-graph-ql": "*",
        "magento/module-graph-ql": "*",
        "magento/module-grouped-product-graph-ql": "*",
        "magento/module-quote-graph-ql": "*",
        "magento/module-store-graph-ql": "*",
        "magento/module-swatches-graph-ql": "*",
        "magento/module-tax-graph-ql": "*",
        "magento/module-url-rewrite-graph-ql": "*",
        "magento/module-weee-graph-ql": "*",

        "magento/module-advanced-pricing-import-export": "*",
        "magento/module-bundle-import-export": "*",
        "magento/module-configurable-import-export": "*",
        "magento/module-customer-import-export": "*",
        "magento/module-downloadable-import-export": "*",
        "magento/module-grouped-import-export": "*",
        "magento/module-tax-import-export": "*",

        "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-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-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-distance-based-source-selection": "*",
        "temando/module-shipping-m2": "*",
        "dotmailer/dotmailer-magento2-extension": "*",
        "klarna/module-kp": "*",
        "klarna/module-ordermanagement": "*",
        "klarna/module-core": "*",
        "amzn/amazon-pay-sdk-php": "*",
        "amzn/amazon-pay-and-login-with-amazon-core-module": "*",
        "amzn/login-with-amazon-module": "*",
        "amzn/amazon-pay-module": "*",
        "vertex/module-tax": "*",
        "vertex/sdk": "*"
    },

They've also written blog post of 2.2.x

https://www.integer-net.com/removing-unused-core-modules-from-magento-2-the-right-way/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.