Priyanka_Biswas
Databricks Employee
Databricks Employee

Hi @erigaud  The issue you're facing might be due to the fact that the folder was a mounted storage account that has been deleted. This could cause some inconsistencies in the file system view and hence, you're unable to delete the folder.
You can try using Databricks Utilities to refresh the mounts and then attempt to delete the folder again.
Here is the command you can use in Databricks notebook:

python
dbutils.fs.refreshMounts()
dbutils.fs.rm("/mnt/my_folder", recurse=True)

This command will refresh the state of the mounts in your workspace and then attempt to delete the folder recursively.

View solution in original post