Score:0

/var taking up too much space

in flag

I got a message that I am running out of space, so I did du -h and figured that the /var folder was taking 176 GB space! I cleared away all the .gz (gzipped files) but still no improvement!

enter image description here

Artur Meinild avatar
vn flag
Please post the output of `ls -l /var/log`. And for the file that takes up space `tail -n 100 <filename>`. You probably need to find out what's spamming your logs with information (probably `syslog` or `kern.log`).
hr flag
See also [Very large log files, what should I do?](https://askubuntu.com/questions/515146/very-large-log-files-what-should-i-do)
zwets avatar
us flag
To find out what is using up a lot of space: `sudo du | sort -n`. That aggregates on the directory level, whereas in your case it must be files, so `sudo du -a | sort -n` should give you the biggest consumers at the bottom.
Score:0
cn flag

Your du output shows that the space is occupied by files in /var/log itself, not in some subdirectory.

The next step would be to check that directory for excessively big files. This is most easily done by the command

ls -lS | head

which shows the nine biggest files in the directory in descending order.

If that doesn't solve the riddle yet then you can run the tail command on the biggest one to see its last ten lines. These will very probably include one or more specimens of the message that's filling your disk.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.