cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.3 - Proper way to uninstall module which install by composer

SOLVED

Magento 2.3 - Proper way to uninstall module which install by composer

I just installed the module using composer, what is the proper way to uninstall and remove the files also under vendor folder?

2 ACCEPTED SOLUTIONS

Accepted Solutions

Re: Magento 2.3 - Proper way to uninstall module which install by composer

Hi @Aveeva 

 

The process of removing extension using composer its quite similar the way you have installed it.

 

You will require to pass the directory name and module name along with the command.

 

Example if the extension vendor name is - XYZ and module name is - ABC then you will require to run a command like following : 

 

composer remove xyz/module-abc

It's just that check the status of the module before removing it by running the command : 

php bin/magento module:status

To know more details following I am sharing the reference link : 

 

https://mirasvit.com/knowledge-base/how-to-remove-magento-2-extension.html 

https://support.weltpixel.com/hc/en-us/articles/115006483588-How-to-uninstall-and-remove-a-Magento-2... 

 

Hope it helps !

if issue solved,Click Kudos & Accept as Solution

View solution in original post

Re: Magento 2.3 - Proper way to uninstall module which install by composer

Hello @Aveeva 

 

The most preferable way is first you check the module documentation about it's removing process because when you install any module it creates some tables/columns which may throw some error later.

- if there is no documentation about uninstalling, first disable that module :

 

php bin/magento module:disable MODULE_NAME

- check which tables/columns it created and remove if they are no longer needed, you can check it inside Setup/* folder or etc/declarative_schema.xml file.

 

- and then finally remove the module by composer :

 

composer remove vendor/module-name

NOTE : Disabling module first is necessary because there might be some other modules which can be dependent on that module, so if there is any it will throw error about module dependency.

 

But always check the documentation if there is any information about uninstalling.

Problem Solved ? Click on 'Kudos' & Accept as Solution ! Smiley Happy

View solution in original post

2 REPLIES 2

Re: Magento 2.3 - Proper way to uninstall module which install by composer

Hi @Aveeva 

 

The process of removing extension using composer its quite similar the way you have installed it.

 

You will require to pass the directory name and module name along with the command.

 

Example if the extension vendor name is - XYZ and module name is - ABC then you will require to run a command like following : 

 

composer remove xyz/module-abc

It's just that check the status of the module before removing it by running the command : 

php bin/magento module:status

To know more details following I am sharing the reference link : 

 

https://mirasvit.com/knowledge-base/how-to-remove-magento-2-extension.html 

https://support.weltpixel.com/hc/en-us/articles/115006483588-How-to-uninstall-and-remove-a-Magento-2... 

 

Hope it helps !

if issue solved,Click Kudos & Accept as Solution

Re: Magento 2.3 - Proper way to uninstall module which install by composer

Hello @Aveeva 

 

The most preferable way is first you check the module documentation about it's removing process because when you install any module it creates some tables/columns which may throw some error later.

- if there is no documentation about uninstalling, first disable that module :

 

php bin/magento module:disable MODULE_NAME

- check which tables/columns it created and remove if they are no longer needed, you can check it inside Setup/* folder or etc/declarative_schema.xml file.

 

- and then finally remove the module by composer :

 

composer remove vendor/module-name

NOTE : Disabling module first is necessary because there might be some other modules which can be dependent on that module, so if there is any it will throw error about module dependency.

 

But always check the documentation if there is any information about uninstalling.

Problem Solved ? Click on 'Kudos' & Accept as Solution ! Smiley Happy