How to remove Apache logs & errors

Delete all files

Use the following command to remove all the files and directories inside your apache2 log.

You may want to reload it after deleting.


rm -rf /var/log/apache2/*

Reload Apache


/etc/init.d/apache2 restart

About Rick

Senior Front-end Software Engineer from Barcelona, Haidong Gumdo Instructor (korean martial art of the sword), street photographer, travel lover, TV addict, Boston Red Sox fan, and privacy advocate.
2 comments
  • Thanks a lot man. You saved my day, and my Ubuntu. My logs where 13 GB so I removed them but the space wasn’t freed up even the logs folder was absolutely empty. I’ve tried restarting apache, but nothing worked, nothing but the reload command you’ve posted here. Thanks again.

Leave a Reply

Add <code> Some Code </code> by using this tags.

*
*