This module removes references to a deleted entity from fields stored in an SQL database. It exists to prevent stale references to non-existent content from causing unexpected problems (for example, when the referencing content is being displayed).
The module takes a general approach to solving the problem and therefore works for a variety of field types, including taxonomy term reference fields (thereby effectively fixing #1281114: Database records not deleted for Term Reference Fields after Term is Deleted), Entity Reference fields (though this may not work reliably for non-node references, due to a Drupal core bug; see discussion at #1969042: foreign key information on entity reference fields is not reliable), and node/user reference fields provided by the References module.
It is limited to working with fields stored in an SQL database, but that still covers the vast majority of fields used on the vast majority of Drupal sites.
For a related project, see Reference Delete, which works for a more limited set of reference fields (e.g., not including taxonomy term reference fields). A proposal to merge these modules is at #1775838: Merge this module with the "Field reference delete" sandbox module?, which is why this one is still a sandbox project rather than a full project with a release; however, this module's code should be relatively stable.
Also see References Integrity, which is limited to node/user references and takes a different approach of actually re-saving the referencing entity via API functions (rather than simply cleaning up the stale references in the database).
This project was sponsored by Advomatic.