Safely clean out old log files?
Amedee Van Gasse (ub)
amedee-ubuntu at amedee.be
Fri Dec 4 23:40:23 UTC 2009
On Fri, December 4, 2009 23:38, NoOp wrote:
> What is the best method to safely clean out old log files? I have log
> files on some of my machines that go back to 2007 & I'm pretty sure that
> I don't need them any longer. I could of course simply rm/delete any
> logs that are older than one month, but wonder if that is the wisest
> choice.
>
> I know how to easily remove the old .gz files:
> $ sudo rm -v /var/log/*.gz
> but older non-.gz files will remain.
>
> I have /etc/logrotate.conf set to:
>
> # rotate log files weekly
> weekly
> # keep 4 weeks worth of backlogs
> rotate 4
> # create new (empty) log files after rotating old ones
> create
>
> but logrotate wasn't set up until about the hardy or intrepid timeframe,
> so I still have a lot of old .gz junk in /var/log.
Others have already given good answers, but I am wondering why logrotate
doesn't pick up old logfiles. That sounds like a bug to me...
--
Amedee
More information about the ubuntu-users
mailing list