Magento 2 - How to uninstall module?

it says in the documentation you linked, this:

This command works only with modules defined as Composer packages.

If you did not install the module via composer, it won't work.
You can only disable it via bin/magento module:disable SP_Gridthumbs.

To remove the module, remove the folder SP/Gridthumbs, remove the record with module = 'SP_Gridthumbs' from the table setup_module and remove any other tables or records added by the install of the module.
Also remove the line with SP_Gridthumbs from app/etc/config.php


Below are the steps to Uninstall Module Manually for Magento 2

  • Delete the Module folder from {folder path}\app\code

  • Remove module entry from setup_module

  • Run command

    {magento project root path}>{php path}\php.exe bin/magento setup:upgrade => Setup Upgrade

    {magento project root path}>{php path}\php.exe bin/magento cache:flush => Clear Cache


How about:

php bin/magento module:disable <ExtensionProvider_ExtensionName> --clear-static-content
composer remove VendorName/VendorExtensionRepository
php bin/magento setup:upgrade

For composer modules:

php bin/magento module:disable <ExtensionProvider_ExtensionName> --clear-static-content
php bin/magento module:uninstall <ExtensionProvider_ExtensionName> -r
composer update
php bin/magento setup:upgrade