4

I had small system in my VPS, which only had 10GB disk usage. Now as I check /var/log directory used 6GB to only write log!!! which it sound very crazy to me.

Crazy Screenshot

I have tried cleanup the log following this suggestion, but still not much help. Is there any reason why the log take so much disk usage? How to fix it? I don't want to have log file that big.

12
  • Do you have log-rotate installed?
    – Braiam
    Jan 9, 2014 at 4:12
  • 1
    /var/log is a folder, not one log file. Inside that folder, there are many log files. You need to go into that folder and specifically find the log files that're eating up the space, and remove them or trim them, and delete old logfiles that logrotate left behind.
    – Thomas Ward
    Jan 9, 2014 at 4:13
  • @Braiam Nope, never heard of it @_@
    – GusDeCooL
    Jan 9, 2014 at 4:19
  • @ThomasW. So basically it safe to just delete all the log file?
    – GusDeCooL
    Jan 9, 2014 at 4:23
  • 1
    @GusDeCooL no, you should never just delete all the log files. There's probably certain log files you can safely remove, but I don't know what they are offhand.
    – Thomas Ward
    Jan 9, 2014 at 4:24

1 Answer 1

1

Install logrotate to manage your log files:

How to manage log files

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .