0

I would like for example to remove php and all it's components and extensions as seen in this picture, but instead of removing every software one by one, is there anyway safe I can remove them all using a single command?

enter image description here

4
  • Removing the lowest-common-denominator dependency would be a good start. In this case php55w-common, perhaps. – Faheem Mitha Sep 19 '14 at 15:39
  • Yeah, that is what I did. It only removed like 4 dependencies along with it. But there might be a might grep way to do this – robue-a7119895 Sep 19 '14 at 15:44
  • Sure, you could ask to remove all packages of the form php55w-* if you want. – Faheem Mitha Sep 19 '14 at 16:55
  • Oooh. I don't think this is a duplicate. The grep-based solution is dangerous. Better to use yum's own wildcards or in some cases `yum --setopt="clean_requirements_on_remove=1" – mattdm Sep 19 '14 at 18:03
0

Since you are in CentOS, you could use the yum as suggested here.

yum remove $(yum list installed | grep php | cut -d' ' -f1 | tr "\n" " ")

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