After installing Magento 2, you will normally install extensions to build a fully functional website as you like. After a while of realizing that some extensions are no longer relevant and useful, it’s time to remove them, because when there are many extensions in the Magento 2 store, it will adversely affect page load time, conflict. conflicts between two extensions, take up a lot of resources, and can also cause SQL errors. In this article, I will show you how to uninstall and remove extensions in Magento 2.
How do I uninstall Magento 2 extensions?
If you make a magento extension download but you want to uninstall it after that, then i will show you how to remove module Magento 2 through 3 ways
Remove module Magento 2 manualy
Go to the root of Magento 2, run the following command to show the module list and on/off status.
php bin/magento module:status
Next we will move to the folder containing the module and delete it with the following commands
cd app/code/<Vendor>/ rm -rf <Name>
Or just simply uninstall magento 2 extension manualy by clicking delete.
After that, run following commands
php bin/magento setup:upgrade
Uninstall modules installed via Composer
If you have ever installed this Extension via composer, you can use this way. Move to Magento root folder then run the command.
bin/magento module:uninstall <module_name>
How do I disable a module in Magento 2?
Magento disable module is far different from magento remove extension because you just turn off the extension, not delete all extension from the database. Bellow is the guide for disabling module magento 2
Disable module Magento 2 manually
There are two ways to disable module magento 2. For the first way, go to root folder -> app -> etc -> config.php. In config file, find the module you want to turn off and change number from 1 to 0. Remember to run
php bin/magento setup:upgrade php bin/magento cache:clean
Usually, magento 2 extensions will have a configuration section to turn the module off or on. They will usually be located in Admin Panel > Stores > Settings > Configuration > Module Name. Another way is that you can go there and set disable for your module. Remember to run cache flush command or execute cache on admin.
Disable module Magento 2 command
You just need to run following commands to disable module
php bin/magento module:disable <module_name> php bin/magento setup:upgrade bin/magento cache:clean
Above is the guide for making an uninstall extension magento and disable module Magento 2. Hope this guide helps you!