Hi @Nimma05 , Please check below to investigate it.
Try with pageManager.delete(pageManager.getPage(pagePath), true) and see if it works.
For the further investigation.
1- Check if the Page is being used by another process (workflow etc.)
2- If the page has multiple versions or is part of a version history, deleting the current version might not be sufficient. You might need to delete all versions or handle versioning.
3- Double-check that the user or service running the deletion code has the required access rights.
Otherwise, for testing, try deleting the page manually in the AEM. This may provide more detailed error messages or pop-ups that can give more clues about the failure