My file /var/log
is 110 GB and system tell me low disk space.
What should I do? Should I delete the log file I have tried?
$ sudo apt-get clean
$ sudo apt-get autoclean
$ sudo apt-get autoremove
But doesn't work.
My file /var/log
is 110 GB and system tell me low disk space.
What should I do? Should I delete the log file I have tried?
$ sudo apt-get clean
$ sudo apt-get autoclean
$ sudo apt-get autoremove
But doesn't work.
That is a directory and those commands deal with installed packages. They are unrelated. logrotate can be used to remove, compress, and/ or send logs to your email. What you need is up to you. Learning how to read the man pages is very helpful and, yes, it does take some getting used to. Those files are very important, please do not just delete them. Read the man page (at the command prompt: $ man logrotate), search the internet and post back with what you think you want to type and get an explanation from someone about what it will do. Also read the apt-get manual page ($ man apt-get) to see what they both do, as a reference. And, the habit of typing 'whatever' into the command line can be hazardous to your computer and your sanity.
find /var/log -type f -delete ("Delete all .gz and rotated file find /var/log -type f -regex "..gz$" find /var/log -type f -regex "..[0-9]$" Try run command without "-delete", to test it.") and it make file size equal 16MB
– Muhamad Nady Oct 06 '18 at 15:11
/var/log
is a directory that contains files (and directories). Readman logrotate
– waltinator Oct 06 '18 at 14:26/var/log
. – PerlDuck Oct 06 '18 at 14:36