General

How can I Uninstall and Remove a Magento 2 Extension

Hello Magento Friends,

Today I will be mentioning a much-needed topic for all the Magento 2 merchants. How can I Uninstall and Remove a Magento 2 Extension?

Quick Summary:

Extensions help to add functionalities to your Magento 2 store apart from the default settings. Installing Magento 2 extensions facilitates enhancing store performance. Different extension holds different operational capabilities. Thus, there is a number of extensions installed in your Magento 2 store. Make sure the extensions are compatible with the latest version Magento 2.4.

A time may arise where you need to uninstall the extension due to any reason. Too many extensions affect the performance of the store, so you want to uninstall the unwanted extensions. Also, when you find two or more extensions that have similar features, you want to uninstall one from it. The other reason may include, the extensions that are no longer needed in your store needs to be removed.

Hence, for the smooth performance of your Magento 2 website, completely remove or uninstall the not required extensions. One can Uninstall or Remove a Magento 2 Extension in two ways – Manually and Using Composer. Let’s see both the ways in detail 

Steps to Uninstall or Remove a Magento 2 Extension – Manually

Step 1:  Firstly you have to check the extensions you need to uninstall. So, connect through SSH to the root of your Magento installation folder and check the list of all extensions installed with the help of the following command.

php bin/magento module:status

Step 2: Now, for uninstalling the extension disable that extension module with the help of the below commands.

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

php bin/magento setup:upgrade

Step 3: Remove the extension using the below code.

cd app/code/<ExtensionProvider>/ 

rm -rf <ExtensionName

Step 4: Run the following code after the completion of the above step.

php bin/magento setup:upgrade

Illustration: By the following illustration code of uninstalling my module you will get a clear idea about the steps to uninstall the extension.

php bin/magento module:disable Magecomp_Paymentfee --clear-static-content

php bin/magento setup:upgrade

cd app/code/Magecomp 

rm -rf Paymentfee

php bin/magento setup:upgrade

Steps to Uninstall or Remove a Magento 2 Extension – Using Composer

Step 1: Firstly you have to check the extensions you need to uninstall. So, connect through SSH to the root of your Magento installation folder and check the list of all extensions installed with the help of the following command.

php bin/magento module:status

Step 2: Now, for uninstalling the extension disable that extension module with the help of the given below commands. Just apply to your system by filling in the appropriate details.

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

php bin/magento setup:upgrade

– ExtensionProvider and ExtensionName it will be viewed from the composer.json file of that extension.

– For the name of VendorName and VendorExtension, you will get in your composer.json file which is included with that extension.

Illustration: By the following illustration code of uninstalling my module you will get a clear idea about the steps to uninstall the extension.

php bin/magento module:disable Magecomp_Paymentfee --clear-static-content

composer remove magecomp/magento-2-payment-fee

php bin/magento setup:upgrade

Note: For the composer method you might need to enter a username and password while uninstalling the module.

Final Words:

Hence, this way you can remove or uninstall a Magento 2 extension. In case you face any difficulties, let me know through the comment section below. Help your Magento friends to successfully remove or uninstall a Magento 2 extension by sharing the article with them. Stay connected for more such Magento solutions.

Happy Reading.

Click to rate this post!
[Total: 8 Average: 5]
Gaurav Jain

Gaurav Jain is Co-Founder and Adobe Certified Expert-Magento Commerce Business Practitioner. Being Computer Engineer👨‍💻 and possessing Extensive Marketing skills he handles all kinds of customer Queries and his Happy😀 & Helping🙏 Nature makes customer's day Delightful. When he isn’t working, you’ll find Gaurav Reading on Books📖 or Traveling🚗. Also, he is Speaker at Magento Meetups.

Recent Posts

Magento 2: Add Quantity Increment and Decrement on Category Page

Hello Magento Friends, In this blog, we will discuss about adding quantity increment and decrement…

11 hours ago

How to Integrate ChatGPT with Laravel Application?

In this guide, we'll explore how to integrate ChatGPT, an AI-powered chatbot, with a Laravel…

3 days ago

What are Net Sales? How to Calculate Your Net Sales?

In the world of business, understanding financial metrics is crucial for making informed decisions and…

6 days ago

Magento 2 Extensions Digest April 2024 (New Release & Updates)

Welcome to the MageComp Monthly Digest, where we bring you the latest updates, releases, and…

6 days ago

The ABCs of Geofencing: Definition, Features and Uses

In this era, businesses are always on the lookout for ways to engage with their…

7 days ago

How to Delete Product Variant in a Shopify Remix App using GraphQL Mutations?

Managing a Shopify store efficiently involves keeping your product catalog organized. This includes removing outdated…

1 week ago