[root partition is full - /var/log is huge

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
doronba
Level 2
Level 2
Posts: 61
Joined: Thu Feb 21, 2013 5:39 am

[root partition is full - /var/log is huge

Post by doronba »

hi,
i use my linux mint 14 for a while, and recently it says that root partition is 100% full.
i have been checking and found that /var/log uses most of the space (10.2 GB),
i don't know what this folder contains and should i delete some files of it.
i have been using linux for few years, PCLINUXOS, UBUNTU, MINT, and it it is the first time that something like this happens to me.
i usually let the root partition 12 gb and it was enough always.

can someone please tell me what is this folder at all and what can i delete of it ?

thanks.
doronba
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
xenopeek
Level 25
Level 25
Posts: 29607
Joined: Wed Jul 06, 2011 3:58 am

Re: root partition is full - /var/log is huge

Post by xenopeek »

/var/log is for ... drum-roll ... your log files. Normally those are rotated daily, with a weeks worth of history kept in archives. So normally it is kept to a manageable size automatically. (6.5 MB total here.) If you have 10 GB worth of log files, something is wrong and asking for your action. So instead of immediately deleting it, find the newest, biggest, file there and read it. Browse through it and you should surely see some error repeat hundreds of thousands of times. What is that error? What program is notifying you something is wrong? Fix it, then delete any of the big log files (anything bigger than 1 MB) and then reboot. This doesn't do any harm; programs will automatically create a new log file and continue logging there after reboot.
Image
doronba
Level 2
Level 2
Posts: 61
Joined: Thu Feb 21, 2013 5:39 am

Re: root partition is full - /var/log is huge

Post by doronba »

thanks a lot for the excellent answer.

after observing the files list again i found the blame for the huge size, these are the 2 hugh files :
kern.log.1 = 5.5 gb
syslog.1 = 5.5 gb

i opened them and both have thousands of lines, which obviously i should not scan in order to find the problem, unless you can tell me what to look for and how.
but, if it is possible to just delete these 2 naughty boys from my /var/log folder i think that it would be more than enough.
can i delete them and then reboot, and everything will be fine ?
might all this fuss be because of me using the hibernate option (the happily and finally i can use on linux) ?

thanks.
doronba
User avatar
xenopeek
Level 25
Level 25
Posts: 29607
Joined: Wed Jul 06, 2011 3:58 am

Re: root partition is full - /var/log is huge

Post by xenopeek »

You can delete both and need not reboot. These are log files from at least 24 hours ago, so you can delete them without disturbing anything.

I suggest you have a look in /var/log/syslog from time to time. Unless you fix whatever is wrong these files will probably grow on you again. Easy what you are looking for; go to the end of the file and start scrolling back. With a file this big it should be obvious which message is repeated over and over and over again, if you scroll 10 pages up it should start jumping out at you.
Image
doronba
Level 2
Level 2
Posts: 61
Joined: Thu Feb 21, 2013 5:39 am

Re: root partition is full - /var/log is huge

Post by doronba »

thanks a lot - seems like SOLVED
Locked

Return to “Other topics”