Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
    
Do you have log-rotate installed? –  Braiam Jan 9 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 W. Jan 9 at 4:13
    
@Braiam Nope, never heard of it @_@ –  GusDeCooL Jan 9 at 4:19
    
@ThomasW. So basically it safe to just delete all the log file? –  GusDeCooL Jan 9 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 W. Jan 9 at 4:24

1 Answer 1

up vote 1 down vote accepted

Install logrotate to manage your log files:

How to manage log files

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.