You can query for gcroots using this:
As long as that gcroot is “live”, you can’t remove the path in question.