Match source URLs against installed payload filenames, including converted .dsl.dz files.
Remove source records only after successful payload deletion and preserve them while a matching file remains.
Clean stale records from physical directory state without racing pending downloads.