Magento 2 CLI – Disable All Custom and Third Party Modules with Single Command

climagento2module

Is there is any way that we can disable all custom and third party Module in a single command? Currently, I am using below command to disable multiple modules

php bin/magento module:disable module1 module2 module3….moduleN

Currently I am defining all module but I don't want to define all modules since there are so many modules.

Best Answer

php bin/magento module:status | grep -v Magento | grep -v List | grep -v None | grep -v -e '^$'| xargs php bin/magento module:disable

Credit : Toan Nguyen

Source

Related Topic