I just installed the module using composer, what is the proper way to uninstall and remove the files also under vendor folder?
Solved! Go to Solution.
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
Hope it helps !
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.
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
Hope it helps !
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.