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.

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


  • Will this disable all custom and third party modules,means which are exist in app/code folder? – akgola Sep 12 '17 at 11:20
  • Yes, but without Magento – Keyur Shah Sep 12 '17 at 11:20
  • It would be nice if you can provide link to the original thread instead of the user. – Rajeev K Tomy Sep 12 '17 at 12:03
  • Yes, just updated the answer, thanks :) @RajeevKTomy – Keyur Shah Sep 12 '17 at 12:05
  • Does not work all the time, sometimes it throws errors that it cant disable a module because some other module depends on it. – Black Feb 28 '20 at 14:54

You can simply disable what modules you want by modify in app/etc/config.php file the value form 1 to 0 for the specific module. and the run php bin/magento setup:upgrade command.


'Ves_Setup' => 1, 


'Ves_Setup' => 0, 

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.