On an Exchange Server 2013 server that is installed with the Mailbox server role, when you attempt to delete the files and folders for a database or database copy that has been removed, you may receive an error.
The action can’t be completed because the file is open in noderunner.exe
Inside the folders that previously contained the database you will see various subfolders and index files relating to search services.
The issue is that even though the database has been removed the search/index files are still locked by the noderunner.exe process and can’t be deleted.
Using Process Explorer we can see that noderunner.exe is a child process of the Microsoft Exchange Search Host Controller (HostControllerService) service.
To clear the file lock you can restart the HostControllerService service using PowerShell.
PS C:\> Restart-Service HostControllerService
You should now be able to delete the files and folders successfully.
In my own scenario the HostControllerService began consuming a large amount of CPU for a short period of time after the restart, but then calmed down to normal levels again after a few moments.