Delete unreachable, inaccessible ghost pages in XWiki

Is there a possibility to delete pages that are not accessible but still can be found as ghost files in the menu in any way easy to delete maybe also with a macro, extension etc.

We often have the problem that pages are no longer accessible after deletion, but are still listed in the navigation

Do you have a useful solution/help?