How to clean various log files in magento 2

I am using centos and cpanel for magento 2.4.2 installation. I noticed that there is huge files in GB’s (red rectangles) in the directory public_htmls/var/log/bak. is there anyone who could guide me how to:

  1. Clean the various log files manually using CLI commands for centos. I have seen some sudo commands for that but not working for centos.

  2. tell me whats that folder bak for?


Hi Adnan,
Craig made a video about cleaning log files using logrotate that you can find here :


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.