Question

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

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

Subscribe
Share

ok thank you however i am on ubuntu

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.

thank you, another question, when update/upgrade system i’ll need delete old packeges for free space? and how i can do it securly?

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


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

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