As far as I know, yum list is case insensitive, while yum install and yum remove are case sensitive -- probably as a security feature to prevent unintended system changes.

Is there a way to change the case sensitivity of any yum command?

  • 1
    No,there is not – fpmurphy Jun 2 '16 at 14:17
  • Can you help me understand the use case here? When would you want this? – mattdm Jun 2 '16 at 16:06
  • When installing or removing a package whose name might contain uppercase chars but I'm not sure about. – dr01 Jun 3 '16 at 7:51

No, but there is a workaround. When doing yum install and yum remove, to make it work case insensitive.

  pack=Zvbi; yum install $(yum list $pack | cut -d' ' -f1 | tail -n1)

  pack=iMaGeMaGiCk; yum install $(yum list $pack | cut -d' ' -f1 | tail -n1)
  • 1
    This won't always be valid - there are some package names that have capitals in them, and this workaround will break with those packages. An example is ImageMagick - yum install imagemagick won't do anything, but yum install ImageMagick works as expected. – John Jun 2 '16 at 15:08
  • @John is right, +1 however as this tip might come handy. I've edited the answer, hope you don't mind. – dr01 Jun 2 '16 at 15:11
  • Another option might be to replace all uppercase letters with the ? wildcard character: echo ImageMagick AnotherPackage |tr [:upper:] '?'|xargs yum -y install – mattdm Jun 2 '16 at 16:05
  • Now i edited it to a better version that can run for ImageMagick. – Luciano Andress Martini Jun 2 '16 at 18:00

Currently yum does not support case insensitive operations on packages (install/remove), this way by design. There are some tickets/discussions on the Red Hat Bugzilla site about it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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