2

I have these log files:

72K     /var/log/dist-upgrade
4.0K    /var/log/samba/cores/smbd
4.0K    /var/log/samba/cores/nmbd
12K     /var/log/samba/cores
84K     /var/log/samba
44K     /var/log/gdm
4.0K    /var/log/bittorrent
1.6M    /var/log/installer
4.0K    /var/log/asterisk/cdr-custom
19M     /var/log/asterisk/cdr-csv
1.2G    /var/log/asterisk
4.0K    /var/log/apparmor
4.0K    /var/log/unattended-upgrades
36K     /var/log/cups
4.0K    /var/log/news
120K    /var/log/proftpd
12K     /var/log/fsck
28K     /var/log/apt
1.2G    /var/log

Could I please get some help cleaning these log files?

Jos
  • 30,529
  • 8
  • 89
  • 96
Docfxit
  • 29

2 Answers2

2

Simple log cleanning

sudo /etc/cron.daily/logrotate

optionnal, delete log archives

sudo find /var/log -type f -iname *.gz -delete

Find more about freeing disk space on root partition : https://askubuntu.com/a/1161181/77093

cmak.fr
  • 8,976
0

by clean do you mean remove/delete?

if so then this has already been answered:

As described in those answers, to delete all logs open terminal, CTRL+ALT+T, and run:

sudo rm /var/log/*

to delete a specific log file run:

sudo rm /var/log/*nameoflogfile*.log 

Although as stated in this answer, it is also worth checking through the logs to find out what exactly is causing your logs to grow so large.