How to Uninstall Magento 2 Module – 3 Simple Solutions

by Juvia

Uninstall Magento 2 modules is a proactive measure to maintain the health, security, and efficiency of your online store. It’s a strategic approach that provides a smoother user experience and ensures your Magento 2 environment is optimized for growth and adaptability.

While installing an extension might be a quick task, the challenge lies in effectively removing it without compromising existing data. If this is your problem, don’t worry, this article will give you the simplest ways to ensure a smooth remove extension Magento 2 process without impacting your existing data.

Let’s explore these solutions to enhance your website effortlessly.

How to Uninstall Magento 2 module

Uninstall Magento 2 extension is a vital practice for optimizing the performance, resolving conflicts, and enhancing security of your online store. By removing unused or conflicting modules, you not only conserve valuable server resources but also contribute to a streamlined user experience. 

In this section, we’ll show you three simple ways to uninstall Magento extension: Web Setup Wizard, Command line, and Composer. 

Solution 1: Uninstall magento 2 extension via Web setup wizard

In the Magento 2 Admin Panel, navigate to System ⇒ Web Setup Wizard ⇒ Extension Manager ⇒ Update / Uninstall.


Solution 2: Uninstall module Magento 2 via Command line

Step 1: Navigate to your Magento project directory. To uninstall Magento 2 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.

EX: php bin/magento module:uninstall Bss_PreOrder

Step 3: Run: php bin/magento setup:upgrade.

Next, Step 4: Run: php bin/magento setup:static-content:deploy.

Step 5: Clear all Cache.

Note: If you attempt to uninstall Magento 2 module with a dependency on another module, you must uninstall both.

Most BSS Commerce’s modules do not have an Uninstall file.

Solution 3: Uninstall Magento 2 extension via Composer

Step 1: Navigate to your Magento project directory. To uninstall Magento 2 extension, you can run:

php bin/magento module:disable VendorName_ModuleName

EX: 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 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.


In conclusion, the article has provided you with the simplest ways to ensure a smooth uninstall Magento 2 module process. Now armed with these solutions, you can effortlessly enhance your website, maintaining its performance and responsiveness. By diligently following these steps, you can seamlessly remove modules from your Magento 2 setup, ensuring a streamlined and efficient website management experience.

Moreover, if you have any issues when Install or Disable Magento Extension, explore these methods to address easily:

BSS Commerce stands out as a provider of Magento extensions and web development services globally. Our team comprises skilled and certified Magento developers dedicated to delivering top-notch products and services, aiming to enhance business efficiency. 

Feel free to REACH OUT to us for assistance. We are ready and willing to address any issues you may have, providing support at any time you need.

NEW: We have launched Trello’s Product Roadmap to keep you updated on our latest product versions. Share your feedback and suggestions for Magento solutions to help us improve your experience here. With our Product Roadmap, you can also request updates or compatibility for your desired modules or suggest a new one to enhance your website.
>> Explore NOW!

Next Reading Suggestions

© 2019 BSS Commerce owned by THANH CONG INTER ., JSC. All Rights Reserved.
Business registration certificate no. 0106064469 issued by Hanoi Department of Planning and Investment on 19 December 2019.
Legal Representative: Mr. Nguyen Quang Trung.