N.Y. CPL. LAW § 160.50 : NY Code - Section 160.50: Order upon termination of criminal action in favor of the accused

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.  Upon  receipt  of  notification  of such
  termination and sealing:
    (a) every photograph of such person and photographic plate  or  proof,
  and  all  palmprints  and  fingerprints  taken  or  made  of such person
  pursuant to the provisions of this article in regard to  the  action  or
  proceeding  terminated, except a dismissal pursuant to section 170.56 or
  210.46 of this chapter, and all duplicates and copies thereof, except  a
  digital  fingerprint image where authorized pursuant to paragraph (e) of
  this subdivision, shall forthwith be, at the discretion of the recipient
  agency, either destroyed or returned to such person, or to the  attorney
  who represented such person at the time of the termination of the action
  or  proceeding,  at  the address given by such person or attorney during
  the action or proceeding, by the division of criminal  justice  services
  and  by  any police department or law enforcement agency having any such
  photograph, photographic plate or proof, palmprint  or  fingerprints  in
  its possession or under its control;
    (b)  any  police  department  or law enforcement agency, including the
  division of criminal justice services, which  transmitted  or  otherwise
  forwarded to any agency of the United States or of any other state or of
  any  other jurisdiction outside the state of New York copies of any such
  photographs, photographic plates or proofs, palmprints and fingerprints,
  including those relating to actions or proceedings which were  dismissed
  pursuant  to  section  170.56 or 210.46 of this chapter, shall forthwith
  formally request in  writing  that  all  such  copies  be  destroyed  or
  returned  to  the  police  department  or  law  enforcement agency which
  transmitted or forwarded them, and,  if  returned,  such  department  or
  agency  shall,  at  its  discretion,  either  destroy  or return them as
  provided herein, except that those relating to  dismissals  pursuant  to
  section  170.56  or  210.46  of  this  chapter shall not be destroyed or
  returned by such department or agency;
    (c) all official records and papers, including judgments and orders of
  a court but not including  published  court  decisions  or  opinions  or
  records  and  briefs  on  appeal, relating to the arrest or prosecution,
  including all duplicates and copies thereof, on file with  the  division
  of  criminal justice services, any court, police agency, or prosecutor's
  office shall be sealed and not made available to any person or public or
  private agency;
    (d) such records shall be made available to the person accused  or  to
  such  person's  designated  agent,  and shall be made available to (i) a
  prosecutor in any proceeding in which the accused has moved for an order
  pursuant to section 170.56 or 210.46 of this  chapter,  or  (ii)  a  law

  enforcement  agency  upon ex parte motion in any superior court, if such
  agency demonstrates to  the  satisfaction  of  the  court  that  justice
  requires  that  such records be made available to it, or (iii) any state
  or  local  officer  or  agency  with  responsibility for the issuance of
  licenses to possess guns, when the accused has made application for such
  a license, or (iv) the New  York  state  division  of  parole  when  the
  accused is on parole supervision as a result of conditional release or a
  parole  release  granted  by the New York state board of parole, and the
  arrest which is the subject of the inquiry is one which  occurred  while
  the  accused  was under such supervision or (v) any prospective employer
  of a police officer or peace officer  as  those  terms  are  defined  in
  subdivisions  thirty-three  and  thirty-four  of  section  1.20  of this
  chapter, in relation to  an  application  for  employment  as  a  police
  officer or peace officer; provided, however, that every person who is an
  applicant  for  the position of police officer or peace officer shall be
  furnished with a copy of all records obtained under this  paragraph  and
  afforded  an  opportunity  to  make  an explanation thereto, or (vi) the
  probation department responsible for supervision of the accused when the
  arrest which is the subject of the inquiry is one which  occurred  while
  the accused was under such supervision; and
    (e)  where fingerprints subject to the provisions of this section have
  been received by the division of criminal justice services and have been
  filed by the division as digital images, such images  may  be  retained,
  provided  that  a fingerprint card of the individual is on file with the
  division which was not sealed pursuant to this section or section 160.55
  of this article.
    2. A report of the termination of the action or proceeding in favor of
  the accused shall be sufficient notice of sealing to the commissioner of
  the division  of  criminal  justice  services  unless  the  report  also
  indicates  that  the court directed that the record not be sealed in the
  interests of  justice.  Where  the  court  has  determined  pursuant  to
  subdivision  one  of this section that sealing is not in the interest of
  justice, the clerk of the  court  shall  include  notification  of  that
  determination  in  any report to such division of the disposition of the
  action or proceeding.
    3. For the purposes of subdivision one of  this  section,  a  criminal
  action  or proceeding against a person shall be considered terminated in
  favor of such person where:
    (a) an order dismissing the entire accusatory instrument against  such
  person pursuant to article four hundred seventy was entered; or
    (b)  an order to dismiss the entire accusatory instrument against such
  person pursuant to  section  170.30,  170.50,  170.55,  170.56,  180.70,
  210.20,  210.46 or 210.47 of this chapter was entered or deemed entered,
  or an order terminating the prosecution against such person was  entered
  pursuant  to  section  180.85  of  this chapter, and the people have not
  appealed from such order or the determination of an appeal or appeals by
  the people from such order has been against the people; or
    (c) a verdict of complete  acquittal  was  made  pursuant  to  section
  330.10 of this chapter; or
    (d)  a  trial  order  of dismissal of the entire accusatory instrument
  against such person pursuant to section 290.10 or 360.40 of this chapter
  was entered and the people have not appealed  from  such  order  or  the
  determination  of an appeal or appeals by the people from such order has
  been against the people; or
    (e) an order setting aside a verdict pursuant  to  section  330.30  or
  370.10 of this chapter was entered and the people have not appealed from
  such  order  or  the determination of an appeal or appeals by the people

  from such order has been against the people and no new  trial  has  been
  ordered; or
    (f)  an  order  vacating a judgment pursuant to section 440.10 of this
  chapter was entered and the people have not appealed from such order  or
  the  determination of an appeal or appeals by the people from such order
  has been against the people, and no new trial has been ordered; or
    (g) an order of discharge pursuant to article  seventy  of  the  civil
  practice  law  and  rules  was entered on a ground which invalidates the
  conviction and the people have not  appealed  from  such  order  or  the
  determination  of an appeal or appeals by the people from such order has
  been against the people; or
    (h) where all charges against such person are  dismissed  pursuant  to
  section  190.75  of  this chapter. In such event, the clerk of the court
  which empaneled the grand jury  shall  serve  a  certification  of  such
  disposition  upon the division of criminal justice services and upon the
  appropriate police department  or  law  enforcement  agency  which  upon
  receipt  thereof,  shall  comply  with the provisions of paragraphs (a),
  (b), (c) and (d) of subdivision one of this section in the  same  manner
  as  is  required  thereunder with respect to an order of a court entered
  pursuant to said subdivision one; or
    (i) prior to the  filing  of  an  accusatory  instrument  in  a  local
  criminal  court  against  such  person,  the  prosecutor  elects  not to
  prosecute such person. In such  event,  the  prosecutor  shall  serve  a
  certification  of such disposition upon the division of criminal justice
  services and upon the appropriate police department or  law  enforcement
  agency  which, upon receipt thereof, shall comply with the provisions of
  paragraphs (a), (b), (c) and (d) of subdivision one of this  section  in
  the  same manner as is required thereunder with respect to an order of a
  court entered pursuant to said subdivision one.
    (j) following the arrest of such person, the arresting police  agency,
  prior  to  the  filing  of  an accusatory instrument in a local criminal
  court but subsequent to the forwarding of a copy of the fingerprints  of
  such  person to the division of criminal justice services, elects not to
  proceed further. In such event, the head of the arresting police  agency
  shall  serve  a  certification  of such disposition upon the division of
  criminal justice services which, upon receipt thereof, shall comply with
  the provisions of paragraphs (a), (b), (c) and (d) of subdivision one of
  this section in the same manner as is required thereunder  with  respect
  to an order of a court entered pursuant to said subdivision one.
    (k)  (i)  The accusatory instrument alleged a violation of article two
  hundred twenty or section 240.36 of the penal law, prior to  the  taking
  effect  of  article  two  hundred  twenty-one  of  the  penal  law, or a
  violation of article two hundred twenty-one of the penal law;  (ii)  the
  sole  controlled  substance  involved is marijuana; (iii) the conviction
  was only for a violation or violations; and (iv) at  least  three  years
  have passed since the offense occurred.
    (l)  An  order dismissing an action pursuant to section 215.40 of this
  chapter was entered.
    4. A person in  whose  favor  a  criminal  action  or  proceeding  was
  terminated,  as  defined in paragraph (a) through (h) of subdivision two
  of this section, prior to the effective date of this section,  may  upon
  motion  apply  to the court in which such termination occurred, upon not
  less than twenty days notice to the  district  attorney,  for  an  order
  granting  to such person the relief set forth in subdivision one of this
  section, and such order shall be granted unless  the  district  attorney
  demonstrates  to  the  satisfaction  of  the court that the interests of
  justice require otherwise. A person in whose favor a criminal action  or
  proceeding  was  terminated,  as  defined  in  paragraph  (i)  or (j) of

  subdivision two of this section, prior to the  effective  date  of  this
  section,  may apply to the appropriate prosecutor or police agency for a
  certification as described in said paragraph (i) or (j) granting to such
  person  the  relief  set  forth therein, and such certification shall be
  granted by such prosecutor or police agency.