Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

While installing package I get some additional packages on dependency. But when I remove installed package with yum, the dependency packages are not removed, though I don't need them anymore.

How can I remove them automatically?

share|improve this question

package-cleanup in yum-utils will give you a list of packages that are not longer used. It cannot automatically remove them though it would be simple to use the output in a script that did this.

You could also look into a yum plugin called remove-with-leaves. I have never used it so I'm not sure of its compatibility with the version of yum in CentOS 5. Also, people seem to have a lot of problems given the results of a quick google search.

share|improve this answer

Check out "package-cleanup" in yum-utils (yum install yum-utils).

share|improve this answer

Your Answer

 
discard

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.