Retiring a script nobody owns
Deleting a script is easy. Proving it was safe to delete is the actual work, and it is the part that keeps you out of an incident review.
Who calls it
Search launchd plists, cron entries, MDM payloads and CI configs for the filename — not the folder. A script with no caller is a candidate; a script with one forgotten caller is a trap.
What it writes
Look for output paths, log lines and the state it leaves behind. A dead script that still creates files can be the reason some other job finds them, so the dependency graph is not only about execution.
Cheap proof
Add a single line that touches a timestamp file, ship it, and wait a week. Empty timestamp after seven days, with no caller found, is evidence. It is not proof, but it is the strongest kind you can get without the author.
Reversible removal
Move the file to an archive folder, keep the caller entry commented out with a date, and put both in the same change. If nothing breaks in the next cycle, the archive gets emptied in the following release.
Leave a headstone
One line in the archive README: what the script did, when it was disabled, and who signed it off. Years later that line answers the question the code itself no longer can.