0

My app service has an export scenario which extracts data from backend and writes to app service file storage first and egress the data to the blob later. These files are huge and sometimes more than 1GB of size. The current SKU of the app service is supporting 250GB and often running into storage problems because of these temp files creation.

Is there a way I could delete these files programmatically through kudu or may be by exposing another delete end point to delete selective files from the server?

Born2Code
  • 127
  • 1
  • 4
  • 19
  • Can't the code pulling the data and writing it to storage also delete the files? – CSharpRocks Jun 11 '22 at 11:32
  • Please refer SO Threads [Ref1](https://stackoverflow.com/questions/69821684/how-to-upload-and-delete-file-of-azure-web-app-using-powershell) and [Ref2](https://stackoverflow.com/questions/52800853/how-to-clean-up-azure-web-app-logfiles-directory) – Harshitha Veeramalla Jun 13 '22 at 03:41
  • @CSharpRocks Yes, It should. Unfortunately, there is a leak in the code which is causing the issue and should be the right fix though. I was exploring other available solutions for this problem. – Born2Code Jun 15 '22 at 23:57

1 Answers1

0

How to delete files created by Azure app service automatically

You can delete files in Azure Web app service created by using kudu console by following the below work-around:

enter image description here

Then click on GO:

enter image description here

Then click on Debug Console:

enter image description here

Then click on CMD:

enter image description here

Then Click on delete:

enter image description here

Other References to delete files are:

Deleting old web app logs using Azure Web Jobs and PowerShell (swimburger.net)

Interacting with Azure Web Apps Virtual File System using PowerShell and the Kudu API – Kloud Blog

RithwikBojja
  • 5,069
  • 2
  • 3
  • 7