//How to Uninstall Magento Extensions? | Magento Tutorial 2020
how-to-uninstall-Magento-extension

How to Uninstall Magento Extensions? | Magento Tutorial 2020

To answer the question of how to uninstall Magento Extensions effectively, first of all, you are possibly confused between the two terms: “Disable” and “Uninstall”. Let’s clarify these terms!

A disable process must be noted that after finished, the module still remains active but functions return to the initial value. Therefore, the process is considered as a “turn-off” process. 

Whereas, an uninstallation of Magento Extensions is referred to as the “delete” process. In this article, we would like to show you how to uninstall Magento Extensions manually and how to uninstall Magento Extension through other Magento uninstall modules.

how-to-uninstall-Magento-extension

>>> Also need to know: All Magento 2 Extension Reviews to leverage your business!

Manual Process VS. Automatic Process?

Depending on the Magento Extension enabled process, you need to disable and uninstall the extension manually or via the composer.

If you are a techie or you have spent a lot of time researching about Magento and how to install and uninstall its Extensions, then it’s easy to distinguish between the two.

However, if in your case you are still quite disturbed, then below will be an extremely brief distinction.

How to Uninstall Magento Extension Manually?

The manual uninstall process is referred to as the process of editing the code. This process includes how to use the command line guided below. However, the manual uninstall method requires must need folder code.

Automatic Magento Uninstall Module

If instead of taking hours or even weeks to change and insert the code, you choose to intervene with a third software that supports the process of disabling and uninstalling, it is called the automatic process.

This process includes the web setup wizard used method and the method via the composer.

Ways to Disable Magento 1.X Extensions

Web Setup Wizard

By default, Magento has a large number of enabled extensions. Additionally, if you have previously installed any third-party extensions, you might want to disable some of them.

Moreover, the interesting feature of this method is using Web Setup Wizard, you don’t need SSH to support. It is also suitable for all of the non-technical developers because of the simple update module version without folder code.

This process is available in a few steps via your Magento Admin panel.

  • Admin Panel ⇒ System ⇒ Configuration
  • The advanced section ⇒ Advanced menu

Ways to Disable Magento 1.X Extensions

Web Setup Wizard

By default, Magento has a large number of enabled extensions. Additionally, if you have previously installed any third-party extensions, you might want to disable some of them.

Moreover, the interesting feature of this method is using Web Setup Wizard, you don’t need SSH to support. It is also suitable for all of the non-technical developers because of the simple update module version without folder code.

This process is available in a few steps via your Magento Admin panel.

  • Admin Panel ⇒ System ⇒ Configuration
  • The advanced section ⇒ Advanced menu
Web-Setup-Wizard-Magento-1
  • Click “Disable Modules Output”
  • Change the “Enable” button to the “Disable” of the extensions that you want to customize the status
Web-Setup-Wizard-Mag1-2

Ways to Disable Magento 2.X Extension

Web Setup Wizard

Web-Setup-Wizard-Mag2-1

In the Magento 2.X Admin Panel:

  • Operating System ⇒ Web Setup Wizard ⇒ Component Manager ⇒ Enabled/Disabled

Command Line

Magento 2 has a powerful built-in command-line tool to perform various tasks.

This command-line based disabled process is the answer to the question “how to uninstall Magento Extension manually?” It can be understood as a way to change the code in the set up to change the Extension status.

Command-Line-Mag2

Step 1 

  • Determine the certain Magento extensions you want to disable, then enter the following command:
php bin/magento module:disable VendorName_ModuleName
  • Example:
php bin/magento module:disable Bss_PreOrder

Step 2

  • Run:
php bin/magento setup:upgrade

Step 3

  • Run
php bin/magento setup:static-content:deploy

Step 4

  • Clear all caches

Extensions Configuration 

However, have you known that as some Magento 1.X Extension, the Magento 2.X Extension providers have added the enable/disable functionality in the module’s configuration? 

This feature gives users permission to automatically disable in case they have issues or evenly just desire to uninstall because of their private conditions? 

extension-configuration-mag2

With this offering, users from now on could easily take control of their module with just a few steps following:

Step 1

  • Operate Store ⇒ Configuration

Step 2 

  • Find the extension’ vendor ⇒ Select the extension ⇒ Enable/Disable it

Step 3

  • Refresh the cache

How to Uninstall Magento 2 Extensions?

Not only provide you various solutions to install Magento 2 extension but we also guide you to uninstall Magento 2 extension. 

As we have compared above, there are differences between a disabled process and an uninstallation. 

Down below is the way how to uninstall Magento Extension. Feel free to select among the following 3 ways.

Web Setup Wizard

In the Magento 2 Admin Panel:

  • Navigate to System ⇒ Web Setup Wizard ⇒ Extension Manager ⇒ Uninstall.
how-to-uninstall-Magento-extension-web-setup-wizard

Command Line

how-to-uninstall-Magento-extension-command-line

Step 1

  • Operate to your Magento project directory
  • To uninstall any installed module, run:
php bin/magento module:uninstall [–backup-code] [–backup-media] [–backup-db] [-r|–remove-data] VendorName_ModuleName

Step 2 

  • If –remove-data is specified, removes the database schema and data defined in the module’s uninstall classes.
  • Example:
php bin/magento module:uninstall Bss_PreOrder

Step 3

  • Run:
php bin/magento setup:upgrade

Step 4

  • Run:
php bin/magento setup:static-content:deploy.

Step 5: 

  • Clear all Cache.
  • Note: If you attempt to uninstall a Magento Extension with a dependency on other modules, you must uninstall both of them.

Uninstall Via Composer

how-to-uninstall-Magento-extension-composer

Composer is a tool to manage caches in PHP (Dependency Management). This tool saves a lot of time dealing with all of the necessary caches packages that need to use.

With Composer, users only need to declare, the composer will automatically download the code of the caches through a community server. And do not worry, the Composer is an open-source (Open Source) so it is very well supported by the community.

Step 1

  • Operate to your Magento project directory. 
  • To disable the module, you can run: 
php bin/magento module:disable VendorName_ModuleName
  • Example:
php bin/magento module:disable Bss_PreOrder

Step 2 

  • Remove extension files:
composer remove [-r|–remove-data] <component-name>
  • The –remove-data option removes database data and schema defined by the module’s Uninstall class.
  • For each specified module to uninstall, invoke the uninstall method in its Uninstall class. This class must inherit from Magento\Framework\Setup\UninstallInterface.

Note

  • You can find the exact match for <component-name> in the composer.json file associated with the extension.

Step 3

  • Run:
php bin/magento setup:upgrade.

Step 4

  • Run:
php bin/magento setup:static-content:deploy.

Step 5

  • Clear all Cache.

Conclusion

Many other methods are also answering the question of how to uninstall the Magento extension. However, we have concluded the 3 methods of disabling process and the 3 methods of the uninstallation.

Most of the customizing guides related to the code insert process and technical aspect are difficult to “chew and digest.” Try it by yourself and choose the most suitable method fitting your Magento Website platform.