I want to stop my Raspberry Pi to create System-wide Logs in Order to save Memory Space. Is there a Way to disable Logrotate?
I Hope You can help me
logrotate periodically runs and typically rotates logs, which means it performs an operation on a log file every so often. Typically it copies the existing log file to a backup and starts the log file over, and will only keep so many backups.
If you don't have
logrotate run every so often, your logs will just grow and grow, and that's not what you want.
You can tell it to keep no backups by specifying
rotate 0 (or a lower number) for the specific log. Look in
/etc/logrotate.d to find the specific configuration fragment. It's been awhile since I've looked into
logrotate but I think you can specify it to limit the size of files and such.
Supposedly you could uninstall packages providing
system-log-daemon to make information logged by daemons via syslog go to nowhere.
If it's not possible (I don't know as I need syslog on all my machines), you could possibly configure an instance which provides the mentioned virtual packages on your machine to log to nowhere—all modern implementations of syslog can do this.
Note that this won't prevent all logging on your machine as certain programs log directly to files and not to syslog, at least by default; the Apache web server is a good example. To deal with such programs, you'll have to identify them and disable their logging using their own means for configuration.