How to solve Gradle Dependency inconsistencies in sub-modules?

Within my Gradle project I have many different versions of the same dependencies.

For example at my top level gradle build file I have declared a certain version of a dependency, but the sub-modules have delcared a different version.

Ideally I would like to have have the dependencies declared once at the top level so that all modules are using the same version of the dependency.

Is it possible to do this so that all sub-modules are using only the dependencies stated in the top level file?

If so, do I just update the top-level dependencies to the latest version and delete the dependencies declared within the sub-modules?