How to Uninstall a Magento 2 Extension?

How to Uninstall a Magento 2 Extension

When you start using Magento, you may install various Magento 2 extensions. Out of curiosity, learning, checking, and just testing.

The store will grow with time and due to all the marketing efforts. You will realize that you do not need all those extensions. You have found the better alternative that fits your store better. Some extensions stop getting updates and become a security issue. 

In that case, you should know how to uninstall a Magento 2 extension from the store.

Uninstalling a Magento extension is not enough. They leave residue behind, and that affects the store’s performance. At the least, they take up space on the server.

Disabling vs. Removing a Magento 2 Extension

The difference between disabling and removing a Magento 2 extension is that when you disable the extension, the data remains intact in the Magento database, silently, and ready to be re-used with all the settings, configurations, and customization you made. However, when you remove/delete a Magento extension, its content, data, and settings are deleted from the Magento store completely.

Unlike Magento themes, you can keep more than one extension enabled at any moment. That’s why users typically disable an extension and leave it as it is without deleting the data.

A disabled but not deleted Magento extension still have access to your site, and enough to make it vulnerable. Hackers can use it to run malicious scripts and scrape your data, including username passwords.

How to Uninstall a Magento 2 Extension?

Uninstalling an extension is not a straight task. The extensions leave the data in unexpected files and folders in the Magento Database. 

In this quick tutorial, I am sharing two methods to uninstall and remove a Magento 2 extension:

  1. Manual Uninstallation
  2. Uninstall Via Composer

The extension uninstallation method depends on its installation process.

#1 Uninstall a Magento 2 Extension Manually

Connect via SSH to the root of your Magento installation (the folder that contains the app folder). Check the list of all extensions, including their enable/disable status.

php bin/magento module:status

Use the following commands to disable the extension.

php bin/magento
module:disable <ExtensionProvider_ExtensionName> --clear-static-content
php bin/magento setup:upgrade

Delete/Remove the extension files that were left behind.

cd app/code/<ExtensionProvider>/
rm -rf <ExtensionName>

Note: Do not remove the shared extension if you have multiple extensions from one vendor. It will delete the dependency pack, which works as a base for all of their extensions.

#2 Composer Uninstallation Method

Connect via SSH to the root of your Magento installation (the folder that contains the app folder). Check the list of all extensions, including their enable/disable status.

php bin/magento module:status

Use the following commands to Disable the Magento 2 extension.

php bin/magento module:disable <ExtensionProvider_ExtensionName> --clear-static-content
php bin/magento setup:upgrade
composer remove VendorName/VendorExtensionRepository

After removing the extension, you should also remove the extension attribute and the product attribute the extension might have created. You have to remove the extension attribute from the database table.

  1. Login to phpMyAdmin
  2. Search table >> ‘eac_attribute’
  3. Delete the extension attribute 

Wrap Up

This quick tutorial taught us how to uninstall and remove a Magento extension.

You can keep lots of extensions on the Magento store. It is not the number but the extensions’ quality that impacts the Magento performance. 

However, quality extensions are only available for popular objectives despite thousands of Magento extensions. Specific Magento functions are performed by mediocre coded modules and extensions, so you should deal with them carefully. 

If you have any questions or doubts, please leave them in the comment box below.

Latest Magento Tips, Guides, & News

Stay updated with new stuff in the Magento ecosystem including exclusive deals, how-to articles, new plugins, and more. 100% Magento Goodness, a promise!

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top

Talk to a sales representative

USA / Worldwide

+1.714.2425683

India

+91.9852704704

We can help you. Right now.

Fast growing merchants depend Breeze for high-performance hosting. Experience counts. Let's get started.

Request demo

Please fill in the details below and we’ll reach out to you with a customized demo of our product!

Get your FREE Image SEO Checklist

Bring more visitors to your image from Google search from the existing images.