How to remove a complete module from ERPNext

Hello everyone,
I have this ERPNext instance and I want to remove the Stocks module completely from it as it’s not needed and I want to simplify the interface for the end users. Can anyone tell me what’s the best way to do this?

I tried deleting the DocTypes of Stocks module, and removing some lines from the dashboard py file, and the links disappear from the projects page, but it gives an error whenever it loads (doctype not found).

Can anyone guide me on how to correctly remove the unneeded modules, or at least, hide them?

This is not recomended. It will result into changes in source code of core product.

For anything you need to set developer_mode to 1, it is development and may result in change of source code.

Try this,
as a “System Manager” User (NOT Administrator) go to Setup > Role and disable unwanted Roles.