2

I just Wondering if we can print the yum parameters without to view the yum configuration files ( by more or cat or vi ... etc)

for example

I configured the variable , in /etc/yum.conf

  installonly_limit = 2

in order to remove the oldest kernel every time a new kernel is installed

can yum print the variables values as installonly_limit ?

  • I don't think so. You would do the best with sed or similar tool. – Jakuje Jun 17 '16 at 21:25
1

Yes, yum can do that, although you might need the valuable yum-utils package installed.

You can either use yum-debug-dump to print all the internal variables, or you can use a small python script to only print what you need specifically (see this answer at the link below for that) or you can try with yum-config-manager to see if it shows what you need.

More details are provided in the existing question Yum: How can I view variables like $releasever, $basearch & $YUM0?

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.