Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Is there a way to tell yum to install a package, selecting a version of that package that would be satisfied by currently installed dependencies?

For example, if I'm installing a pecl package and I currently have installed php-5.4.11 but a newer php-5.4.14 is available. Rather than install the new package (and update all php packages to 5.4.14) I just want it to select an older version of the package I requested to be installed without updating all the others (or fail if this cannot be done).

This is a specific case in which I know I could exclude or fix the php package but I'm looking for a generic option that would apply to any install.

Something like:

yum install php-pecl-xxxx --no-updates
share|improve this question

3 Answers 3

Have not come across any such option as of now. However if u want to install the package without upgrading I would recommend downloading a rpm of same version and then install it.

share|improve this answer

In the yum-utils package there is a tool called yumdownloader. You can use it to download from repos without installing. All the standard switches like --disablerepo apply. See the man page for more into on it.

I think you can download the RPM and then do what you want using RPM directly.

share|improve this answer
This is a part of an automatic package installation system, the problem is that we don't want yum to 'install the latest' and 'update everything that's needed'. We really just want it to install a version of the package that is compatible with what's already installed. Basically an installonly or install xxx -no-updates option. –  Clint Priest May 2 '13 at 16:32

If the older version of the package is still in your yum repositories, then you can just run yum install packagename-version-release.arch and it'll install the older version without trying to upgrade to the latest release. You'll need to use the full name, version, release and arch if there are multiple versions and architectures in your yum repo. You can get all that information by running yum list available 'packagename*' to search for all packages starting with 'packagename'. If you've managed to upgrade your packages and want to downgrade to the older release, you can run yum downgrade packagename1 packagename2. You'll need to include the list of all the packages you want to downgrade, since it probably will involve a lot of dependencies.

If the older release isn't in your yum repository, then just download it from wherever you found the old package and install it with yum install /path/to/package.rpm, although I would caution against installing packages from untrusted sources.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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