Linux

Where Are logrotate Config Files?

logrotate reads /etc/logrotate.conf plus drop in files in /etc/logrotate.d. Rotation state is tracked in /var/lib/logrotate/status.

Last updated

The main file /etc/logrotate.conf sets defaults and includes /etc/logrotate.d. Packages add per service files in that folder.

Last rotation times live in the status file. logrotate usually runs from cron or a systemd timer, so config errors appear at the next scheduled run.

Where logrotate stores this, by platform

Linux
/etc/logrotate.conf

Global options and include line for logrotate.d. Needs root to edit. Test changes in debug mode before relying on the schedule.

Linux
/etc/logrotate.d/

Per app configs. Files must have restrictive permissions in some setups. Use a simple name for reliable include handling on older versions.

Linux
/var/lib/logrotate/status

State file with last rotation date per log. Default path on current distros. Older systems use /var/lib/logrotate.status. Deleting it can cause immediate rotation on next run.

Frequently asked questions

How do I test a new logrotate config safely?

Run logrotate with debug and verbose flags against the target file. Debug mode reports planned actions without changing logs or state.

Why did my log not rotate?

Check status file dates, file size thresholds and time rules, plus cron or timer logs. Missing log handling and permission faults are common causes.

Notice an outdated path? Let us know.