Delete all unused things

Hello everyone
currently i am on development level. and i have only 25GB SDD 1GB RAM 1 CPU.
its fine for me for testing purpose. but i found after few days server shows error. looks like something is filling up over the days. then i found freeswitch logs are about 1GB file.

so for this can someone tell me what i can delete i mean logs/cache .
i am on debian 9 server. so if someone has any script which can remove those unnecessary things can you please share? i want to keep the logs about 3-5 days. so any logs over 5 days can be deleted by cron.

also any other optimize thing which can be keep the server neat and clean every night by cron?

hope someone can help me

thanks in advance

Hello @sokalsondha ,
Yes you can create those kind of script with linux command or you can search out many already develop script you may be found.

For manual empty/delete log file please refer: 5 Ways to Empty or Delete a Large File Content in Linux

Thanks bro…

That was not my question. I can make my own script… but all I want to know which logs are there?

Astpp logs and freeswitch logs right?

Or there are some more logs?

I found in the freeswitch log folder there is freeswitch.log and freeswitch.log1 file.

I think after certain days the old log file become the .log1 file

So this part I just wanted to know.

I can create a script which will delete this file every day but I want to have few days logs… that’s it

Hope you understand bro.

Thanks again for your reply

Hello @sokalsondha ,

You can find that at /var/log/ in that various logs are there, you can delete extra logs like FS, ASTPP, Mail etc. Check that directory and i am sure you get idea what to delete exactly.