Magento – How to Uninstall modules in Magento 2 using composer

composermagento-2.0moduleuninstall

How to Uninstall modules "ub data migration" in Magento 2 using composer

Best Answer

You can uninstall a module through composer if it was installed using composer. If yes then issue command:

php bin/magento module:uninstall -r <Vendor>_<Module>

-r flag removes module data. then issue:

php bin/magento setup:upgrade

If module was not installed through composer:

  • remove the module directory app/code/<Vendor>/<Module>
  • drop module database tables (if it created any)
  • remove entry from core_config_data and setup_module tables

Run command

php bin/magento setup:upgrade