Lets, Check How to Uninstall Extension for Magento 2 store.
On our site and marketplace, many extensions available for Magento 2 stores. If you install many extensions with different functionality in your store.
After installing, if you don't need a certain extension, you can uninstall it.
You can easily uninstall the extension using two methods.
1. Manually
2. Via Composer.
First, We check manually uninstall :
Here We provide step to uninstall any third party extension from your Magento 2 store using manually.
Step 1: Connect to the server via SSH to the root of your Magento installation and check the list of all extension with their enable / disable status.
You can execute below commands to check module list:
=> php bin/magento module:status
Step 2: Disable the module:
You can execute below commands to disable module:
=> php bin/magento module:disable
=> php bin/magento setup:upgrade
Step 3: Remove extension files:
You can execute below commands to remove module files:
=> cd app/code/
=> rm -rf
Note: If you are using more than one extension from the same provider make sure not to remove the shared extension, most providers use a shared extension or dependency pack as a base for all their extensions.
Let's check with Example: You are using MageAnts Magento 2 Sample Product Extension and you wish to uninstall it and remove all files for it.
You can run the following commands to Uninstall and Remove file:
=> php bin/magento module:disable Mageants_SampleProduct --clear-static-content
=> php bin/magento setup:upgrade
=> cd app/code/Mageants/
=> rm -rf SampleProduct
Important: If you are using any other MageAnts extensions, make sure not to remove the 'Backend' shared extension, as it is used by the rest of MageAnts installed extensions. If you are not installed any other MageAnts extensions, it is safe to uninstall and remove also the 'Backend' extension.
Using Composer Uninstall :
Here, We provide a step to uninstall any third party extension from your Magento 2 store using composer.
Step 1: Connect to the server via SSH to the root of your Magento installation and check the list of all extension with their enable / disable status.
You can execute below commands to check list:
=> php bin/magento module:status
Step 2: Disable the Extension:
You can execute below commands to check list:
=> php bin/magento module:disable
=> php bin/magento setup:upgrade
Step 3: Remove the Extension:
You can execute below commands to check list:
=> composer remove VendorName/VendorExtensionName
Note: If you can find the exact match for ExtensionProvider and ExtensionName in composer.json file associated with the extension.
- If you can find the exact match for ExtensionProvider and ExtensionName in composer.json file associated with the extension or under your magento installation/com/vendor/
- You may be asked for composer username and password when uninstalling, you will be able to find them under var/composer_home/auth.json
Example: You are Using MageAnts Magento 2 Sample Product Extension and you wish to uninstall it and remove all files for it.
You can run the following commands to Uninstall and Remove file:
=> php bin/magento module:disable Mageants_SampleProduct --clear-static-content
=> composer remove mageants/SampleProduct
=> php bin/magento setup:upgrade
Important: If you are using other MageAnts extensions, make sure not to remove the 'Backend' shared extension, as it is used by the rest of MageAnts installed extensions.
If you do not have any other MageAnts Magento 2 extensions, it is safe to uninstall and remove also the 'Backend' extension.
Conclusion:
We hope the above blog helps you to clearly understand how to uninstall or remove a module.
In case of any kind of problem, you can contact us or let us know in comment section.