I have recently got into Linux and it's dual booted in my pc with windows 10. I installed a few files in Ubuntu 16.04 and a space of 41 GB is allotted for Ubuntu in my pc. But all of a sudden a prompt came up that I don't have much space remaining. After some looking, I found it's eaten mostly by the log files, more specifically the "syslog.1" file. I am pretty sure there's a mess in my apps and it's logging those problems repeatedly. I will remove most of the apps and start again.
But for now, how do I clean this file and free the 37 GB space that it has been eating up? Will this help? I found this on a forum.
sudo gzip syslog.1
Update:
The above code has worked by compressing the 37 GB log file to about 800 MB. However, I am looking for a permanent solution to find the errors causing the log file to enlarge. I have also installed a lot of .deb files. And they have a lot of unmet dependencies which need to be downloaded. How do I revert this action and remove the files which have unmet dependencies?
I have also tried:
sudo apt-get autoremove
sudo apt-get clean
These don't seem to work.
sudo apt-get -f install
or if you want to remove individual packages manually, usesudo dpkg --remove packagename
– Katu Jul 06 '16 at 14:59compress
to your logrotate config. You can add this to all configs in/etc/logrotate.d
. For logs that are too big now, delete them or compress them like you did. 800MB is still too much considering you will never do anything with it, so delete it:sudo rm syslog.1.gz
, and delete anything that is too big. – SPRBRN Jul 07 '16 at 07:12