• Magento 2.1.5

  • PHP 7.0.16

  • MySQL 5.7.16

Steps to reproduce

Extension installed via composer

$ php bin/magento module:uninstall Mageplaza_Seo -c -> Fail by authentication

$ ln -s /home/user/.composer/auth.json var/composer_home

$ php bin/magento module:uninstall Mageplaza_Seo -c


Expected result

Uninstall extension

Actual result

1. Broken site report
a:4:{i:0;s:217:"Cannot read contents from file "/var/www/html/vendor/mageplaza/magento-2-seo-extension/etc/module.xml" Warning!file_get_contents(/var/www/html/vendor/mageplaza/magento-2-seo-extension/etc/module.xml): failed to open stream: No such file or directory";i:1;s:4849:"#0 /var/www/html/vendor/magento/framework/Module/ModuleList/Loader.php(120): Magento\Framework\Filesystem\Driver\File->fileGetContents('/var/www/html/v...')

I remove references in eav table, try and nothing, I had to install it again

1 Answer 1


Try this

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

This command works only with modules defined as Composer packages.

If you did not install the module via composer, it won't work. You can only disable it via bin/magento module:disable _.

To remove the module, remove the folder , remove the record with module = '' from the table setup_module and remove any other tables or records added by the install of the module. Also remove the line with _ from app/etc/config.php

Ref: https://magento.stackexchange.com/a/105196/35758

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.