How to clear & clean squid logs safe?



  • Hello, My firewall has lager squid log (24G /var/squid/logs)
    I want to clear , clean , reset logs to safe. so how? somebody help me.



  • You can manually stop the squid service and then delete the contents of /var/squid/logs yourself then restart squid. However, a better solution might be for you to enable log rotation and then specify how many days of logs you want to keep. Services - Squid Proxy Server - General - Logging Settings.



  • @KOM said in How to clear & clean squid logs safe?:

    You can manually stop the squid service and then delete the contents of /var/squid/logs yourself then restart squid. However, a better solution might be for you to enable log rotation and then specify how many days of logs you want to keep. Services - Squid Proxy Server - General - Logging Settings.

    Hi, Is this a safe way?



  • I don't know of any other way. When you start squid and it finds no logs it will create a new one and go from there.



  • I also do it manually, haven't found another easier way yet. I'm also interested if there's another way to do that, not sure that there is a safer method, but who knows.



  • I admit that this is one of the problems with Squid as a package with pfSense, it doesn't rely on automatic log rotation and clean-up. I still do it manually, but if there is a software that can do this automatically, I'm in.


Log in to reply