Knowledge Base

Preserving for the future: Shell scripts, AoC, and more

turn dnf color off

Sometimes, color on the console is a good thing. Sometimes, it's distracting. I upgraded to Fedora 31, and was surprised to see colorized output for dnf, the web-aware package manager that wraps around rpm. I was not in a mood to deal with different colors of package names. Yum/dnf already has great output (and apt does not ) and needs no further improvement. So to turn off the dnf color output, just set "color=never" in the "[main]" section of dnf.conf. For users of my bgscripts package from my stackrpms copr, use modconf.

sudo /usr/libexec/bgscripts/py/modconf.py -a /etc/dnf/dnf.conf -s 'main' set color never

Comments