That's a sed /d of course. Or a "Replace all in folder" in any decent code editor.
Or a sufficiently efficient "extract to method" on a decent IDE, that notices the different occurrences even with renamed variables.
Unless those lines of code were subtly edited all over the place and needed careful and subtly different replace for each occurrence, or at last review because that's what's truly evil with duplicated code. It's forks that diverged to maintain N times in your codebase.
Or a sufficiently efficient "extract to method" on a decent IDE, that notices the different occurrences even with renamed variables.
Unless those lines of code were subtly edited all over the place and needed careful and subtly different replace for each occurrence, or at last review because that's what's truly evil with duplicated code. It's forks that diverged to maintain N times in your codebase.