Sounds like they are squatters claiming a technicality - put their stuff out on the street and change the locks.
You can’t in New York. You have to do what this landlord is doing.. probably losing everything to make sure the deadbeats get out. I hope he hounds them for the rest of their lives.