Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

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

How can I query the local package cache of yum on RHEL (and derivatives) without requiring superuser privileges?

Note: I am not interested in running an update of the package cache up front. All I am interested in is to query what the local package cache already knows.

Edit: it turns out the problem wasn't the yum operation (search) itself in this case, but rather the fact that some of the files underneath /etc/yum.repos.d/ were unreadable due to some fellow admin putting them there this way.

share|improve this question
up vote 2 down vote accepted

That would be something like yum --cacheonly list. That (as all information querying commands) is not restricted to the superuser, special powers are only required for installation/erasing (in general, really modifying). See the yum(1) manpage, it details all the commands.

share|improve this answer
Mea culpa, it is. Found yum -C, too. It turns out the actual problem was that one of my fellow admins was so ingenious to deny read access for group and world on a few files underneath /etc/yum.repos.d/. – 0xC0000022L Mar 4 '13 at 19:47

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.