How to uninstall an extension?

How to uninstall an extension?

This article describes a basic flow for extension uninstallation, not touching DB changes.

      Preparation

  1. Before making any changes to your Magento instance, either live or a dev site, make sure to create backups. This way you can secure the changes in case something goes wrong in the process.
  2. So that the uninstall goes smoothly, it's recommended to disable the modules beforehand.
  3. For the uninstall, one of the the first steps to undertake is to define the installation method. Based on this, different actions are required.
    To find out how the module was installed, check where the module files are located. Modules installed via direct file upload have their files in Magento_root_directory/app/code/Amasty. The modules installed via composer locate their files in Magento_root_directory/vendor/amasty.

      Uninstall process

  1. Direct file upload. If the module was installed via direct file upload, please remove the module folder from Magento_root_directory/app/code/Amasty.
  2. Composer. For composer-installed modules, the uninstall should also be done with the use of composer.
    1. Log in to your server via CLI;
    2. Navigate to the Magento root directory;
    3. Run the command to remove the files:
      composer remove amasty/module-name
    4.  With the help of the command above, the module files will be deleted from the server. But before the composer.lock file is updated the module still has dependencies created in your instance. Before these are deleted, the composer won't let you perform the setup scripts to restart the instance. To remove the dependencies run:
      composer dump-autoload

      Final steps

      On this stage, you need to run the setup scripts. The basic recommendation is to redeploy the static content, though depending on the instance peculiarities, other actions might need to be performed (like cache flush and etc).

      • Related Articles

      • How to install an Amasty extension?

        There are two ways of installing an extension on Magento 2. It's recommended to use one and the same installation method for all Amasty extensions. Composer installation Step 1. To download and install Magento modules, the vendor repository is ...
      • How to update an Amasty extension?

        Below, you may find the instructions on installing an update to an Amasty extension. Choose the appropriate method of the extension update – via Composer or via a manual file upload. The choice of the method corresponds to the initial way the ...
      • I’m trying to install the module via composer, but the package is not found. How to resolve it?

              Composer is the dependency manager that allows you easily download the required files on your server. The files are located on a remote server, or a repository, that you need to add to the list of “known” ones and authenticate to using the ...
      • How to translate a Magento 2 extension?

              Generally, an extension consists of specific elements (i.e. interface, settings display, added content) which can be translated to another language. When making a translation, as the first step, look through the module's elements in the Admin ...
      • I’ve updated the modules via composer and I got the error Amasty/Base has been already defined.

              For Amasty modules, there are two possible ways of installation/update: via composer and via a direct file upload. Depending on the initial installation method, the module files will be located in a specific directory. Each installation method ...
      • Announcements

      • Already Done in Q1'23

        New features and improvements Order Attributes v3.8.0 NEW now Order Attributes are placed on the PayPal Review Page; we added compatibility with Hyvä Theme for the module. You can find package for installing in composer suggest (Note: the compatibility
      • Roadmap | What to expect in Q1'23

        New features and improvements Improved Layered Navigation generate SEO-friendly URLs for multi-select Category filter; better speed performance of the Apply filters button; improve Category list load time. Special Promotions Pro optimize data types in
      • Already Done in Q4'22

        New Amasty services Make sure your site is well-performing with our E-commerce QA testing service. Let our specialists check various elements of your website and get the issues fixed. The service is available for any e-commerce platform (Magento, Shopify,
      • Roadmap | What to expect in Q4'22

        New features and improvements Elastic Search better performance of synonyms; REST API support. Product Labels enhanced extension performance with a lot of products on the page. Blog Pro posts migration from one Magento instance to another; email notifications
      • Already done in Q3'22

        New solutions Our new SaaS tool - Website SEO Health Check. Discover the most severe SEO mistakes which can damage your website. Available as part of Pro and Premium SEO Toolkit. New features and improvements Import and Export NEW we added the possibility