Install logrotate by entering the following commands in the terminal:
sudo apt update sudo apt install logrotate
Description:
Log rotation utility
The logrotate utility is designed to simplify the administration of log files on a system which generates a lot of log files. Logrotate allows for the automatic rotation compression, removal and mailing of log files. Logrotate can be set to handle a log file daily, weekly, monthly or when the log file gets to a certain size. Normally, logrotate runs as a daily cron job.
Homepage: https://github.com/logrotate/logrotate
Version: 3.11.0-0.1ubuntu1
Section: admin