Stew
By:
Stew

Free hd space by deleting useless files and folders like access log, error log and more

April 9, 2016 529 views
Apache LAMP Stack Ubuntu

Hello wiich is the useless files and folders i can delete for free hd space?
Thank you

4 comments
  • in general, i don't recommend deleting the access nor error logs as they can helpful for troubleshooting issues. If they are several GB in size for some reason, then i suppose a case can be made to delete those files for some immediate free space.

    Instead, I usually recommend using logrotate to keep the logs under control. A general tutorial on using logrotate for Apache is at this link

    by Justin Ellingwood
    Apache can be configured to log a large quantity of information to help you diagnose problems and keep an eye on activity. In this guide, we will discuss how Apache handles logging and how you can create your own custom logging rules and rotation schemes.
  • thank you, another question, when update/upgrade system i'll need delete old packeges for free space? and how i can do it securly?

  • for red hat and centos systems, you could execute yum clean all, although my personal experience is that the local yum cache directory isn't usually that big.

  • ok thank you however i am on ubuntu

1 Answer

This question was answered by @SphericalCow:

in general, i don't recommend deleting the access nor error logs as they can helpful for troubleshooting issues. If they are several GB in size for some reason, then i suppose a case can be made to delete those files for some immediate free space.

Instead, I usually recommend using logrotate to keep the logs under control. A general tutorial on using logrotate for Apache is at this link

View the original comment

by Justin Ellingwood
Apache can be configured to log a large quantity of information to help you diagnose problems and keep an eye on activity. In this guide, we will discuss how Apache handles logging and how you can create your own custom logging rules and rotation schemes.
Have another answer? Share your knowledge.