Got an error from Anacron below error
error: libcare:3 bad rotation count ‘5 # keep 5 last archives’
error: found error in /var/log/libcare/*.log , skipping
The fix to this issue was
open file
/etc/logrotate.d/libcare
/var/log/libcare/*.log {
daily
rotate 5 #keep 5 last archives
missingok # it’s ok if there is no such file
notifempty # do nothing if file is empty
compress
}
Remove line “#keep 5 last archives” and save file
This fixes the issue