You can install module in magento in two ways: via composer and manual installation. If you no longer need a certain extension you may wish to uninstall it.
If you installed it manually:
- remove the folder
- drop module tables from database
- remove the config settings.1DELETE FROM core_config_data WHERE path LIKE 'vendor_module/%'
- remove the module <Vendor>_<Module> from app/etc/config.php
- remove the module <Vendor>_<Module> from table setup_module1DELETE FROM setup_module WHERE module='<Vendor>_<Module>'
If you installed it via composer:
run this in console
php bin/magento module:uninstall -r <Vendor>_<Module>
There is a known bug that module uninstall never completes – magento2/issues/3544. The solution is to run
composer update in an other console.
If you want to just disable module – check our How to disable module in Magento 2 tutorial.
One thought on “Magento 2: How to uninstall module”
Also it’s worth looking in the eav_attributes table in the source_model column for any references to the module you are removing. I found references here that were preventing my category pages from loading in the admin section.