Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

So I have a package that I am pretty sure that I removed part of one of its dependencies when removing something(as in rm). Long story. Basically what I want to do is have yum re-install the package and all of its dependencies so that it will re-install the files I removed. In the gentoo world you simply do it like this "emerge -e ". It seems yum should be able to do something similar.

I guess I could cobble together a script to list the deps and then parse those out and re-install all of them.

share|improve this question

migrated from stackoverflow.com Sep 21 '11 at 17:55

This question came from our site for professional and enthusiast programmers.

1 Answer 1

up vote 3 down vote accepted

Yeh, there's no easy way to do this ... however you can do a few things:

rpm -Va

...this will do a check on all the packages you have installed, and you can then reinstall anything that doesn't verify. Also:

yum reinstall $(repoquery --requires --recursive --resolve <pkg>)

...this will do what you asked for, although it's a big hammer.

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.