Assume any contributed module X (e.g Quiz) on (=D.O), or any of its sub-modules Y (e.g Quiz Stats). Any such (sub-)module may depend on one or more other contributed (sub-)modules Z (e.g Charts, disclosure: I'm a co-maintainer), as indicated in the (sub-)module's info file (e.g in the last line of the info file of the Quiz Stats module).

My question: How can I identify all modules X and submodules Y, which depend on module Z?

The question about "Is there a API for retrieving the list of available modules?" is somehow related (not a duplicate IMO), but none of the answers there seem to help to find the answer to my question, or am I missing something in those answers?

Note: this question is really about modules "on", so I may not even have Drupal installed anywhere ... Think of this question in the context of, for example, a d8rules campaign, where somebody wants to try to find other modules depending on Rules to reach out to the module (co-)maintainers of those other modules (for whatever reason related to such campaign).

  • Pierre what is D.O? – Adrian Cid Almaguer Mar 8 '17 at 22:41
  • @AdrianCidAlmaguer check the edit (link) to D.O. I added. Did I use an abbreviation that is not correct maybe? Something else? BTW, it's D.O., not D.A. (= Drupal Answers, i.e "here"). Make sense? – Pierre.Vriens Mar 8 '17 at 22:49
  • Unless the module is installed on your system, (local) Drupal does not know what module that is. (module requiring entity without it being installed state they need 'entity'. Once it is installed it is named 'Entity API'.) So Drupal cannot resolve this locally. Use drush, it will resolve the dependencies for you. – Neograph734 Mar 11 '17 at 9:25
  • In that case, this is dependent on a database of dependencies: (found in the d.o API question). Since the issue is still open, I'd say no. – Neograph734 Mar 11 '17 at 9:40
  • @Neograph734, interesting link, but an "active" D6 feature request doesn't look like it will become "fixed" any time soon (hoop doet leven ...). but apart from that, if I correctly understand that issue, it's about the other way around, ie to find modules such as Z, starting from X (or Y), While my question is starting from Z, what are the modules X (or Y). Please correct me if I don't interprete that right. – Pierre.Vriens Mar 11 '17 at 9:52
up vote 4 down vote accepted

As was mentioned above the solution could be parsing info files of all projects hosted on You can use this small tool to facilitate the process of obtaining the codebase of Drupal contributed projects.

Below is an example of searching dependencies for Quiz module.

drupal-project-loader -c 5 -b 7.x -d d7_modules -y &&
cd d7_modules && ag 'dependencies\[\] = quiz$' -G \.info$ |
sed 's/\/.*//;s/^/https:\/\/\/project\//' | uniq | sort

The result:
  • Interesting, merci! Would you mind expanding your answer please to also include a similar result for the "charts" module? If you do, I'll mark your answer right away as accepted also ... – Pierre.Vriens Apr 27 '17 at 11:11
  • @pierre-vriens, it is two-step process. First you download all Drupal 7 modules then search their info files using following regular expression 'dependencies[] = quiz$'. – ya.teck Apr 27 '17 at 11:21

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.