How to uninstall module if admin/modules path is not accessible due to memory error
Use drush:


drush dis MODULE-NAME


You can also disable modules manually in the database:


UPDATE system SET status='0' WHERE name='module_name';

Then you need to clear cached system list (Drupal 7 only):

DELETE FROM cache_bootstrap WHERE cid='system_list'