Skip to main content



bin/magento module:uninstall never completes, hangs on removing code from Magento codebase:

When you are developing a plugin and are writing an uninstaller for it to clean up your attributes and models, you might notice that it hangs on removing code from Magento Code base: It then blinks, and hangs and does nothing for a long time, no matter how long you wait. In this blog post, I will try to explain the cause and a solution for the problem. For the solution, scroll down to the end, where the Solution header is. This problem, without error messages, log entries, or anything noticeable really, is caused by Magento wrapping the composer output in their own buffered output to hide the composer output. You can see this here. In Magento\Setup\Model\ModuleUninstaller  the process to start the uninstall is kickstarted. The message you notice in the console is also visible here. You can see the start of the code here, I'll walk you for a bit through the path where it runs through. $output - > writeln ( '<info>Removing code from Magento codebase:</info>'

Latest Posts

Setting up unit testing with magento2 docker

Setting up Magento 2.4 on windows 10 with Docker

Node.js caching of required scripts

How to recreate encryption by MCRYPT_RIJNDAEL_256 in PHP 7.2 and higher.