1

I've created my uninstall class/script.

After installing my sample module using composer I can see the module working.

Then, I try to uninstall the module using:

bin/magento module:uninstall Barbanet_SampleModule

And I see this message:

You are about to remove code and/or database tables. Are you sure?[y/N]y

Enabling maintenance mode

You are about to remove a module(s) that might have database data. Do you want to remove the data from database?[y/N]y

You are removing data without a database backup.
Removing data of Barbanet_SampleModule
Removing Barbanet_SampleModule from module registry in database
Removing Barbanet_SampleModule from module list in deployment configuration
Removing code from Magento codebase:

Then I press enter a few times I got this message:

Command "remove" failed: Loading composer repositories with package information
    Authentication required (repo.magento.com):
      Username:       Password: 



  [Composer\Downloader\TransportException]                                     
  Invalid credentials for 'https://repo.magento.com/packages.json', aborting.  



remove [--dev] [--no-progress] [--no-update] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [packages1] ... [packagesN]



Please disable maintenance mode after you resolved above issues.

My module was removed from composer.json, also was deleted from the steup_module table and also the custom table was deleted from the database.

My composer keys are stored at my personal auth.json file too.

Someone knows why I'm getting this message and why the uninstall process isn't finishing correctly.

  • The solution is to run : composer update in an other console – lalit mohan Oct 8 '16 at 8:56
  • That command will remove my module and then will update (possibly) all the other modules. I'm trying to understand why the native command fails and how to avoid the error. – Barbanet Oct 8 '16 at 15:38
0

Alan Storm point me to this link on GitHub: Issue #2523

It seems that Magento reads the composer credentials from var/composer_home.

One solution is to create a symbolic link inside var/composer_home with:

ln -s ~/.composer/auth.json .
0

Below are the steps to Uninstall Module Manually for Magento 2

  • Delete the Module folder from {folder path}\app\code
  • Remove module entry from database table setup_module
  • Run command

    go to mangeto root in command prompt like http://prntscr.com/flx68n (go as per your folder drive)
    then run command like : php bin/magento setup:upgrade then clear cache like : php -f bin/magento cache:flush

0

Composer stoped in load data from repo.magento.com

My auth.json was not correct. This decision helped me

config http-basic.repo.magento.com <public_key> <private_key>

How to use the new repo.magento.com

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.