How to get all the disable module list Programmatically in Magento 2?

You can get the list of all the disabled module in Magento 2 by manually from app/etc/config.php.

Module with value equals to 0 is disable the module.

‘Klarna_Core’ => 0, Klarna Core is disable for system.

You can get all the Disable module list using Magento\Framework\Module\FullModuleList and Magento\Framework\Module\ModuleList class.

Check using Programmatically,

Call function from PHP file or template file, $this->getDisabledModules();

The output will be an array of all the disable module in Magento If none of the modules is the disabled result will be the empty array.

I have disabled all the Klarna Module, Result will be,

Check the blog, Get all the Enable Module list Programmatically Magento 2