Module Uninstall Hangs - Solution

So I was trying to remove a couple modules today, which is the first time I have done so. I used the following command:

bin/magento module:uninstall <module_name>

This removed db entries and the code from your system. At least it is suppose to if the module is created properly and has the uninstall file.

This hangs on removing code aspect.

If you create a new screen and run composer update in that screen it will finish out the operation. From my understanding it has something to do requesting credentials and hanging at that point. Regardless, once I did this is was successfully removed. An annoying workaround, but it worked nonetheless.

You can actually initiate a verbose mode, which gives more output as to what’s going on behind the scenes. I think it would be something like:

bin/magento module:uninstall <module_name> -vvv

In my experience, the uninstall command usually takes 1-2 minutes to run anyway.

It was rather quick when I did the workaround. Is it ok to simply run composer update without any other arguments? Will it update things that really shouldn’t be updated for m2?

composer update will update every available module. Unless you’ve set specific version numbers in composer.json.

That seems a bit dangerous. haha

2 Likes