Logrotate is a system utility that manages the automatic rotation and compression of log files. If log files were not rotated, compressed, and periodically pruned, they could eventually consume all available disk space on a system.

Source: How To Manage Logfiles with Logrotate on Ubuntu 16.04 | DigitalOcean