1

I want to delete var/log files due to low disk space, but I cannot find out how.

Hass
  • 11

2 Answers2

2

As mentioned, you can delete a specific log file with sudo rm /var/log/<FILENAME> or all of them with sudo rm /var/log/*.

I also found this: du -h /var/log/ 2>/dev/null > ~/fileinfo to list the size and path of every log file. To view the result you can use cat ~/fileinfo

Jeremi G
  • 121
0

1. Open up the terminal

2a. If you are not sure that you want to delete all of the files you can do it one by one

sudo rm /var/log/logfile.log 

2b. or all of them at once

sudo rm /var/log/* 
abu_bua
  • 11,313
m_krsic
  • 559