Howto get yum to install only dependencies for a given pakage?

a1an asked:

I am looking for a way to have yum install only dependencies for a given package, something like an –prepare-for-install option so I can take a snapshot of the prepared system and test the rpm setup with different options or rebuilds of the package itself on a clean system without having to rely on the rpm uninstall and without downloading the dependencies each time.

My answer:


yum install $(repoquery --requires <package>)

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.