I want to clear the Temp directory for my Web App, however I do not want the app to undergo a restart. Is there a way to just empty out the temp space directly?
I want to clear the Temp directory for my Web App, however I do not want the app to undergo a restart. Is there a way to just empty out the temp space directly?
Yes, temporary storage can be emptied without restarted the Web App. However, it is notable that doing so while the app is running can have unexpected consequences.
The steps to do so would be as follows-
Ensure that this Web App has the app setting which combines the app and Kudu processes:
https://github.com/projectkudu/kudu/wiki/Configurable-settings#use-the-same-process-for-the-user-site-and-the-scm-site
Navigate to Kudu (<web-app-name>.scm.azurewebsites.net) -> Debug Console -> Cmd
Select the Globe (see screenshot) and run the following command: del /q/f/s %TEMP%*
Also note that adding an application setting to the Web App will restart it, which means to empty temporary storage without restarting the app this setting would have needed to be present beforehand.

For more information on handling temporary storage with your Azure Web App, please see the following video- Video:Troubleshoot Temporary Storage on Azure App Service - Azure | Microsoft Docs
12 people are following this question.