**Hardware: Odroid N2+/N2/Helios 64 (3 ARM board) YunoHost version: 4.1.7.1 (stable) I have access to my server : Through SSH | through the webadmin | Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no
Hello everyone,
I am writing this message in English even if my language is French because I have read this post (The language barrier - #23 by ljf).
I think it’s good that YNH reaches the widest audience but I also think that writing in French should remain a possibility (I will do it again often; I write too badly in English :)).
So my problem is that sometimes I get the message in the diagnostics that the storage space / var / log is almost full.
2 questions:
a) this message does not appear all the time and the space used varies => are some logs only temporary ?
b) how to clean in var / log to save space ?
Logs are handled by logrotate, which is a utility that monitors the number and the size of logs per app. There are per-app settings, but basically if there are more than X log files, and their size exceeds some MB, they logrotate will come and compress older logs. Later, when compressed logs are again too many, the older ones are deleted.
You can check which logs are too many/big with ncdu /var/log (run apt install ncdu beforehand to install it). It will show you the directory tree along with the size of its elements.
You can delete selected elements with by typing d. I would advise you to only delete compressed .gz logs, and archived ones (ending with .log.1, .log.2 and so on).
If you are unhappy with the configuration of logrotate for one app, you can check it out in /etc/logrotate.d. Feel free to open an issue in the app’s repository if you think the community could benefit from an optimized logrotate rule.
Logs are handled by logrotate, which is a utility that monitors the number and the size of logs per app. There are per-app settings, but basically if there are more than X log files, and their size exceeds some MB, they logrotate will come and compress older logs. Later, when compressed logs are again too many, the older ones are deleted.
OK I understood.
You can check which logs are too many/big with ncdu /var/log (run apt install ncdu beforehand to install it). It will show you the directory tree along with the size of its elements.
The output of ncdu /var/log (thanks for the tip) is :