I'm doing a tag review and I have found the Tag Diagnostics -> Active Subscriptions page which makes me think that I can programmatically find all of the tags that are no longer being used, but I don't want to have to right click -> tag diagnostics -> active subscriptions every single tag.
I know this is a relatively new feature but I can't find any scripting reference for it yet. I have enabled the tag reference tracking in the gateway tag providers settings, and I know this will likely miss "ad hoc" references made via expression / script, but it can get me a shorter list of things to evaluate.