OK to delete log files?

Discussion in 'macOS' started by Mork, Apr 2, 2012.

  1. Mork macrumors 6502

    Jan 9, 2009
    I have some very large ".log" files in the /private/var/log folder.

    kernel.log.1, for example, is over 2 GB.

    I'd like to set up a Hazel rule to delete any file in that folder that ends with ".log".

    The problem is I want to make sure none of these files are cached by the Mac OS and "expected" to be there for writing.

    Since I found these .log files in a directory that starts with "private", I wanted to make sure first.

    All the other log directories are small by comparison.

    So, is it OK to remove files with ".log" in the file name in /private/var/log?

    Thanks in advance.

    - m
  2. Quad5Ny macrumors 6502a


    Sep 13, 2009
    New York, USA
    Yes, you can delete the logs.

    But the best way to do it would be:
    • Open Terminal
    • Type "sudo periodic daily weekly monthly"
    • Type "sudo newsyslog -F"
    • You can then safely delete any logs ending in .1 (2,3,4,ect.), .bz2, .gz or .out (as they are no longer in use)

    As for you personal log folder in ~/Library/logs you can just trash everything without worrying.

Share This Page