How to Uninstall and Remove Magento2 Extension

Depending on the installation method, you need to uninstall or disable magento 2 extension manually or via composer. Both methods are explained below.

A. Manual Uninstallation

Step 1: Connect via SSH to your magento installation and execute below commands:

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

Step 2: Remove extension files

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

Note: If you are using more extensions 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.

Example: Let assume you are using WeltPixel OWL Carousel Extension and you want to uninstall it and remove all associated files:

  • php bin/magento module:disable WeltPixel_OwlCarouselSlider –clear-static-content
  • php bin/magento setup:upgrade
  • cd app/code/WeltPixel/
  • rm -rf OwlCarouselSlider

Important: If you are using other WeltPixel extensions make sure not to remove the ‘Backend’ shared extension as it is used by the rest of WeltPixel installed extensions. If you do not have any other WeltPixel extensions it is safe to uninstall and remove also the ‘Backend’ extension.

B. Via Composer Uninstallation

Step 1: Connect via SSH to your magneto installation and execute below commands:

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

Note 1: you can find the exact match for ExtensionProvider and ExtensionName in composer.json file associated with the extension.

Note 2: you can find the exact match for VendorName and VendorExtension in composer.json file associated with the extension.or under your Magento installation/com/vendor/<VendorName>/<VendorExtension>

Note 3: 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: Let assume you are using WeltPixel OWL Carousel Extension and you want to uninstall it and remove all associated files. The first thing you should disable this extension, run the setup upgrade and finally remove the files via composer:

  • php bin/magento module:disable WeltPixel_OwlCarouselSlider –clear-static-content
  • composer remove weltpixel/m2-weltpixel-owl-carousel-slider
  • php bin/magento setup:upgrade

Important: If you are using other WeltPixel extensions make sure not to disable the ‘Backend’ shared extension as it is used by the rest of WeltPixel installed extensions. If you do not have any other WeltPixel extensions it is safe to uninstall and remove also the ‘Backend’ extension.

Other Magento 2 Extensions you may prefer:

Related blogs you maybe interested in:

Phuong Pham

Recent Posts

15+ Must-have Magento 2 Free Extensions To Supercharge Your Store In 2025 | Latest updates

Magento 2 is an incredibly flexible and powerful eCommerce platform that can be tailored to…

6 days ago

Black Friday 2024: Hot Deals Collection For Magento 2

Black Friday and Cyber Monday – BFCM 2024 are nearly around the corner, and it’s…

1 week ago

What To Consider While Using Magento 2.0 For Your Streaming App?

When it comes to e-Commerce platforms, undoubtedly Magento 2.0 grabs the spotlight. Magento might not…

1 week ago

Landofcoder BFCM 2024: Biggest Sale Of The Year – 30% OFF All Magento 2 Extensions

The holiday shopping season is here, and there’s no better time to supercharge your Magento…

1 week ago

Top 10 Progressive Web App Development Companies To Elevate Your Business

In today’s digital landscape, the rapid evolution of advanced web applications, particularly Progressive Web Apps…

2 weeks ago

Why Your Retail Business Needs Big Data eCommerce In 2025?

As eCommerce booms, big data eCommerce will be all about providing insight into how to…

2 weeks ago