How to install Logrotate on Ubuntu
Installing Logrotate on a Ubuntu 22.04 system.
Logrotate should be install by default on your Ubuntu system. If not, follow these instructions:
Update your system package list first:
$ sudo apt update
After the update is done, the success message should be:
Reading package lists... Done Building dependency tree... Done Reading state information... Done 62 packages can be upgraded. Run apt list --upgradable to see them.
Install the latest version available of logrotate:
$ sudo apt install logrotate
If logrotate is already installed, you should receive the following success message:
Reading package lists... Done Building dependency tree Reading state information... Done logrotate is already the newest version (3.14.0-4ubuntu3). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.