How to handle dangling references to deleted records

Is there a way to manually delete the dangling reference?