0
votes

I'm trying to delete my previous app deployment files present in kudu /site/wwwroot/ before a new Azure deployment. I tried running the curl command with delete method -

curl -u username:password -X DELETE "https://{web-app-name}.scm.azurewebsites.net/api/vfs/site/wwwroot/"

But I got the following error :- Cannot delete directory. It is either not empty or access is not allowed

Any idea how I can delete the files via the terminal window without actually having to manually delete them?

Any help would be greatly appreciated, Thanks!

1

1 Answers

0
votes

If you are using Visual Studio for deployment you can check this box before deployment,

enter image description here

Or you can use Powershell script by calling Kudu VFS API

DELETE https://{site}.scm.azurewebsites.net/api/vfs/wwwroot/some.config.default