How to delete old error logs?

Hello everyone,

I do have EE v4 installed and most of my domains do have now an error log from 50 to 500 mb. I would like to reset or clear them. I was looking for a command, but ee log does only show these logs.

Any help would be really appreciated.

The linux command to delete a file is rm. if you want to learn more, type rm --help or man rm

rm = remove
man = manual

good luck.

what happen if i delete this…
sudo rm -r /var/lib/docker/overlay2
please help sir i want to fix my storage…

Hello David,

thanks for the help. I would like to keep the file. I do think it is needed for EE. I just would like to reset it to the starting point.

@David111 - what file are you talking about?
@jounin21 - don’t delete that, it’s part of the docker system.

This is a long standing bug in EE and there’s at least few mentions on this forum - it pretty much makes EE4 unuseable.
Here’s your issue. Because EE4 was built on a docker proxying to other dockers, there’s no centralised place for logs. This causes a huge issue that the proxy docker doesn’t know how big and where are the website logs. Unfortunately, the lack of support from EE contributors makes it hard to predict whether and if it ever will be fixed.

By saying that here’s what you need to manually clean:

  1. Nginx proxy logs are in /opt/easyengine/services/nginx-proxy/logs there are generally small but worth looking at
  2. Maria DB binary log - by default EE is logging binaries and these can grow very quickly, they’re here: /opt/easyengine/services/mariadb/logs Be very careful - you mustn’t remove files from there, please search on Google how to purge bin log
  3. The biggest pain in the bum - literally each of your sites will have Nginx and PHP log that have no limits which in some cases comes to tens of GB as I’ve seen (access log). They’re all here: /opt/easyengine/sites/EACHWEBSITE.COM/logs and you need to clean both nginx and php logs. IMPORTANT AGAIN: You cannot remove them, search on Google how to empty Nginx logs but do not remove as it will kill your nginx

The best part? You’ll have to do it manually over and over again every few weeks as there’s no solution so far. You can find a post on this forum how to disable MariaDB binary log so that should save you some space but so far no solutions for exponentially growing Nginx and PHP logs.

Good luck.


Hello Ralf,

thanks a lot for your help and the explaining. I see now that this is a real problem. I do have plenty harddrive space, but for someone with little harddrive space EE4 is unusable. It is also a lot of hassle to clean up let say 20 or more installations. I do like the speed of EE, but I do think I have to change to something different. Any recommendations?

I fix this problem by run cron job:

          • find /var/lib/docker/volumes/YOURWEBSITE_log_php/_data/*.log -mmin +360 -delete

That will run the find command every 360 minutes (six hours) and delete the files.

I have a lot of problem with EE since 2 years ago. And i always find the way to solve every problems day by day.
Because EE is great.

1 Like

Hello Taufan,

first thanks for your help. As I am just a simple user, so I was not able to setup the cronjob. It would be nice, if someone here could write a step by step guide, as almost everyone here does need to solve this problem. I was now able to reduce the size with this command inside of the log folder.

sudo truncate -s 0 *.log

this was reducing the 2 logfiles to 0

Just as @ralf said…

Won’t it be better to truncate/empty the file instead of deleting it?
Does easyengine docker recreates the file on its own once it got deleted by any mean?