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>'