How To Install Logrotate On Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS?

How To Install Logrotate On Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS?

logrotate

Log rotation utility

Maintainer: Christian Gu00f6ttsche



Section: admin

Install logrotate

  • Debian apt-get install logrotate Click to copy
  • Ubuntu apt-get install logrotate Click to copy
  • Alpine OS apk add logrotate Click to copy
  • Arch Linux pacman -S logrotate Click to copy
  • Kali Linux apt-get install logrotate Click to copy
  • CentOS yum install logrotate Click to copy
  • Fedora dnf install logrotate Click to copy
  • Raspbian apt-get install logrotate Click to copy
  • macOS brew install logrotate Click to copy

logrotate

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.

Installation of latest logrotate command is available for Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian and macOS. You can copy the command for your OS from above and paste it into your terminal. Once you run the command it will download the 2026 latest package from the repository and install it in your computer/server.