Extension (Module) Disable / Process of delete

Magento 2 Extension Disable

  1. First of all, go to /var/www/html directory:
    php bin/magento maintenance:enable to make the site on maintenance mode. 
  2. Find out the extension you want to remove from the site.
  3. Run php bin/magento module:status command to see list of active and deactivate extensions.
  4. Select the extension you want to remove and find out the status of the extension. If the extension
    is on the active status, please deactivate that by running
    php bin/magento module:disable Vendor_Modulename –clear-static-content.
  5. Then check again the module status of that extension is now on deactivate status or not.
  6. After
    that remove the related file of that extension and run these commands sequentially as bellow:
  • php bin/magento setup:upgrade
  • php bin/magento setup:di:compile
  • php bin/magento setup:static-content:deploy –f
  • php bin/magento indexer:reindex
  • php bin/magento cache:flush
  • chmod -Rf 777 generated var pub
  • php bin/magento maintenance:disable

     After that restore CSS