Sean Avery got a sweet deal in his drug possession and criminal mischief case ... and if he keeps his nose clean ... it'll be off his record.
Back in September '15, Avery -- who played 10 seasons in the NHL -- was arrested in Southampton Village, NY after allegedly throwing rocks at speeding cars. Cops said they also found prescription pain medication on him.
The ex-NHL star was arrested and charged with criminal mischief and 2 counts of criminal possession of a controlled substance -- all misdemeanors.
Avery -- who was facing jail time -- caught a break ... accepting a deal that will see the charges dismissed if he can go 45 days without getting in trouble, according to Southhampton PD.
He ain't totally in the clear ... Avery does have to pay $746.25 in damages.