I have installed Ubuntu 16.04 two days ago on a 158GB HDD and it is already showing 128GB space is used. After checking the drive I've found that the directory /var/log
is occupying 116GB and it is constantly expanding its size,
Size of different files in /var/log
is :
- syslog — 21GB
- syslog1 — 36GB
- kern.log — 57GB
Now I see this problem is faced by many Ubuntu users and there are different questions have already been asked 1, 2, 3 and 4. But I don't know which folder I should delete.
Furthermore, I am using HP Probook 440 G3.
Help in this regard is highly appreciated. Thanks!
Best Answer
You don't want to delete those files... yet. You need to review them to see what activity is occurring on your computer that causes the log files to get so large. In
terminal
, typemore /var/log/syslog*
ormore /var/log/kern.log
.If the files are too large, or you have trouble interpreting what you're seeing, monitor them in real time... in
terminal
, usetail -f /var/log/syslog
ortail -f /var/log/kern.log
. You'll probably see one error that repeats itself over and over.In reviewing the log files, you have a problem with your video subsystem. See Nvidia GeForce 930M driver and PCI bus error for a similar problem/fix. Also see https://h30434.www3.hp.com/t5/Notebook-Software-and-How-To-Questions/Error-Spam-AER-id-00e5-PCIe-Bus-Error-severity-Corrected/td-p/5933687 and https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1521173. Google "device id 8086:9d15" if you need more info yet.
In
terminal
...gksudo gedit /etc/default/grub
pci=nomsi
ORpci=noaer
(which ever one fixes your problem) topci=nomsi
"pci=noaer
"sudo update-grub
reboot