Sorry if it's a stupid question. I would like to free up some space and /var/log is full of logs. I do not intend to use any of the log files, so I don't care if they get deleted or not. But I afraid that it may affect the functionality of the services that produce logs. I understand that it may depend on the program that produces the logs. but Do you think it would be safe to remove regular services and system log such as:
alternatives.log
auth.log
boot.log
mail.log
syslog
dmesg
dpkg
faillog
fontconfig.log
kern.log
wtmp
nginx/*
apt/*
btmp
It is actually safe. you can also zero them out
> /var/log/nginx/error.log
for example. You can also but these in a script and call it with cronCrontab:
1 5 */2 * 0 /home/user/scripts/delnginxlogs.sh
Actual script:
etc,etc