DNF log rotation is handled in different places

Solution Verified - Updated -


  • In Red Hat Enterprise Linux (RHEL) 8, DNF is the new package management tool and comes with 4 different log files:

    • /var/log/dnf.log
    • /var/log/hawkey.log
    • /var/log/dnf.rpm.log
    • /var/log/dnf.librepo.log

    The logrotation configuration is handled in 2 different places:

    • /etc/dnf/dnf.conf (option log_rotate - default 4)
    • /etc/logrotate.d/dnf
  • Changing one of the following options:

    • rotate
    • weekly/daily/yearly

    in /etc/logrotate.conf doesn't change the log rotate behavior for some DNF log files.

  • Where is the log rotation configuration for dnf.log - it is not included in /etc/logrotate.d/dnf?


  • Red Hat Enterprise Linux (RHEL) 8

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content