Delete all incoming links of a file

What I am trying to do

I want to delete all the backlinks of a particular file, ideally using templater


Use a code editor to bulk find and replace

Why workaround is not ideal

This is part of bigger script, it would much easier to execute it in bulk, if I can do it using templater or some other equivalent plugin

Thanks in advance