
Quoting
NY Criminal Procedure Section 160.50
1. Upon the termination of a criminal action or proceeding against a person in favor of such person, as defined in subdivision three of this section, unless the district attorney upon motion with not less than five days notice to such person or his or her attorney demonstrates to the satisfaction of the court that the interests of justice require otherwise, or the court on its own motion with not less than five days notice to such person or his or her attorney determines that the interests of justice require otherwise and states the reasons for such determination on the record, the record of such action or proceeding shall be sealed and the clerk of the court wherein such criminal action or proceeding was terminated shall immediately notify the commissioner of the division of criminal justice services and the heads of all appropriate police departments and other law enforcement agencies that the action has been terminated in favor of the accused, and unless the court has directed otherwise, that the record of such action or proceeding shall be sealed. ...