In case you no longer need a certain module and do not want to remove it from your Magento 2, you can simply disable (turn off) it via Admin Panel.
1. Login to Magento store Dashboard and go to the Stores section, then tap Configuration.
2. Expand the Advanced tap and click Advanced.
3. Find the module you want to disable and select “Disable” from the option dropdown.
4. Remember to Save the changes and clear the Magento cache.