1

Today I was freeing my space in my Linux mint 17. Disk analyzer found that /var/log uses 54+ GB.

What is /var/log used for ? Is it safe to delete /var/log ?

enter image description here

1
  • Your logs should automatically be pruned via a cron job. I think logrotate is also used. You should first check why this is not happening. Nov 7, 2015 at 16:10

2 Answers 2

4

Log files from the system and various programs/services, especially login (/var/log/wtmp which logs all logins and logouts into the system) and syslog (/var/log/messages, where all kernel and system program message are usually stored). Files in /var/log can often grow indefinitely, and may require cleaning at regular intervals. Something that is now normally managed via log rotation utilities such as 'logrotate'. This utility also 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. This is a good place to start troubleshooting general technical problems.

Here you can find other information.

0
1

All the logs are stored in /var/log by default. If your system is a testing system or you don't really care what is in the log you can clear the log. But if you any of your application gives a error logs are the only place where you will find complete explanation.

If you are certain that none of the logs is useful for you, you can always clear them, just try this.

echo 0 > /var/log/log_file_name

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.