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
?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityToday 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
?
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.
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