Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
40
rated 0 times [  40] [ 0]  / answers: 1 / hits: 160274  / 1 Year ago, tue, may 23, 2023, 8:43:08

Just had the message:




Low disk space.. 2 GB left




Judging by a posted message on ubuntu.org forums, I found that I have a .log file in /var/log at 22 GB in size! My root is an 82 GB partition and Disk Analyser shows the offender to be in log. The system root was installed circa 8 months ago, so clearly this is not a good thing in creating a 22 GB log on an 82 GB root partition.



Is it safe to delete the log file or please advise on the correct safe procedure to cleanse it without messing up my system. I presume it may be ok, but would like some other opinions before I do the task of delete.


More From » delete

 Answers
4

It is generally safe to delete log files. The only disadvantage associated with doing so is that you may not be able to examine the log, if you're troubleshooting some other problem later. Since new logs are automatically generated, even this disadvantage is short-lived.



Most logs are deleted automatically (after being rotated by compression and renaming, and kept a while in that archived format). If you have a log that's expanded faster than Ubuntu is deleting it, it's unlikely that you'll experience any problems from deleting it manually.



However, if you have a log file that's 22 gigs in size, something very strange is happening, and it would be worthwhile to investigate that. I recommend editing your question again to include a link to the Ubuntu Forums thread you're talking about, and also to include the full name of the 22 GB log file.


[#36389] Tuesday, May 23, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
sconhoney

Total Points: 403
Total Questions: 118
Total Answers: 109

Location: Andorra
Member since Mon, Jan 9, 2023
1 Year ago
sconhoney questions
;