Hello Miloš Petrović,
Thank you for posting your query here!
I understand that you are trying to delete the logs from your web app after they have been copied to the storage account. Here are a couple of methods you can use:
· You can use a PowerShell script to delete the Web App LogFile. The script first gets the publishing credentials of the web app, then it uses these credentials to authorize a request to the Kudu API, which can be used to manage and configure your Azure Web App.
· Another way to handle this is by creating a CRON triggered WebJob that runs on a daily or weekly basis. WebJobs run on the same App Service plan which means you can use a simple PowerShell script to delete old log-files created by your App Service.
Further details: https://stackoverflow.com/questions/52800853/how-to-clean-up-azure-web-app-logfiles-directory
Please be careful when deleting files from your web app. Deleting certain files can cause issues with your app. Always make sure to only delete log files and not any configuration or necessary files for your app to run.
I hope this helps! Please let me know if the issue persists or if you have any other questions.
Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.