Code:
# systemctl status logrotate
× logrotate.service - Rotate log files
Loaded: loaded (/usr/lib/systemd/system/logrotate.service; static)
Active: failed (Result: exit-code) since ...
* Invocation: *********************
TriggeredBy: ● logrotate.timer
Docs: man:logrotate(8)
man:logrotate.conf(5)
Process: 364821 ExecStart=/usr/sbin/logrotate /etc/logrotate.conf (code=exited, status=1/FAILURE)
Main PID: 364821 (code=exited, status=1/FAILURE)
Mem peak: 3M
CPU: 60ms
systemd[1]: Starting logrotate.service - Rotate log files...
logrotate[364821]: error: cloud-init-base:1 duplicate log entry for /var/log/cloud-init*.log
logrotate[364821]: error: found error in file cloud-init-base, skipping
systemd[1]: logrotate.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: logrotate.service: Failed with result 'exit-code'.
systemd[1]: Failed to start logrotate.service - Rotate log files.
So, the logrotate configuration file named
cloud-init-base has a
duplicate log rotation entry for
/var/log/cloud-init*.log.
The path of addressing this failure depends on the answer to the question whether
cloud-init needs to/should be available in Linux Lite?
cloud-init is an initialization system designed for cloud instances (AWS EC2, Azure VMs, Google Cloud, OpenStack, etc.).
For people not using cloud-init functionality (I expect it to be the vast majority of Linux Lite users), the resolution can be to just remove
cloud-init:
Code:
sudo apt purge cloud-init -y && sudo apt autoremove -y
sudo rm -rf /etc/cloud /etc/logrotate.d/cloud-init-base
Otherwise, the duplicate logrotate entry needed to be fixed.
Same seems to apply to the next version of Linux Lite 8.2 - remove or fix

cloud-init get's pulled in by open-vm-tools which we need to keep so people can test drive LL in a VM before deciding if they like it or not.
Thanks, Jerry, for the info.
It only gets pulled in with additional flag --install-suggests.
I haven't properly tested it, but from the info I found leaving cloud-init out shouldn't affect development/testing VM installations. According to the description it's primarily helpful for cloud deployment to avoid manual configuration?
I wouldn't even have noticed the presence if logrotate didn't break. I still think the one way or the other it should be addressed to make sure logrotate is working properly, shouldn't it?
Here’s what’s going on.
logrotate is failing because two config files both claim the same log:
logrotate[...]: error: cloud-init-base:1 duplicate log entry for /var/log/cloud-init*.log
Upstream split the cloud-init package into cloud-init + cloud-init-base and moved the logrotate rule into -base.
On systems that were upgraded (rather than freshly installed), the old pre-split file /etc/logrotate.d/cloud-init gets left behind, so it and the new /etc/logrotate.d/cloud-init-base both try to rotate /var/log/cloud-init*.log. logrotate refuses the duplicate and the service reports failed. Everything else still rotates normally — only cloud-init’s logs are skipped.
Fix it by removing the leftover file (only if it’s an unowned orphan):
Code:
ls /etc/logrotate.d/cloud-init* # you should see BOTH cloud-init and cloud-init-base
dpkg -S /etc/logrotate.d/cloud-init # expect "no path found" = orphaned, safe to remove
sudo rm /etc/logrotate.d/cloud-init
sudo systemctl start logrotate.service # should now succeed
If dpkg -S instead names a package, stop — don’t delete it, and let us know which package.
Freshly-installed Linux Lite 8.0 systems don’t have this (only cloud-init-base ships the file there), so it’s purely an upgrade leftover. We’ve added an automatic cleanup to Lite Patch — a coming update (via Install Updates) will remove the orphaned file for you on upgraded systems, so you won’t have to touch it by hand.
Thanks, Jerry, very detailed and informative!