When you try to delete an authentication realm, you receive the error message "Realm <name> is referenced by policy".
Before a realm can be deleted from the configuration, it has to clear of any reference in the policy and it can't be part of a sequence realm
Ensure that the realm is not referenced in any way:
Checking the "All objects" in the VPM and delete all user and groups implicitly:
From the VPM > Click on View > Click on All Objects > from "Show" dropdown menu, select User Objects > Delete any user object that specifies the realm in question > If it is reference in a policy it will give you error and ask to show you where it is referenced.
Do the same exact same for Group Objects as well
Verify sequence realms and make sure that the realm wanting to delete isn't part of a sequence
Go to Configuration Tab > Policy > Policy Files > Click View Current Policy and Search for the realm being referenced > go remove the reference if needed
If confirming there is no reference to the Realm in any Authentication policy (Admin or Web), no User Objects that reference the Realm or Group object reference to the realm, then chances are the ProxySG is holding it in Memory > Reboot the device to clear it.