A huge stash of Tom Petty treasure — including his unreleased music — is back with his family … because cops didn’t let the alleged burglar do him like that.

Law enforcement sources tell TMZ … a man broke into Petty’s San Fernando Valley storage unit last month and swiped at least $100k worth of valuables. Among the jacked items were guitars and other instruments and some guns. Perhaps most significantly, some precious hard drives loaded with Tom’s music — including unreleased tracks — were stolen.

The good news — we’re told police caught a suspect who confessed to the crime. He’s been arrested for burglary.

Even better … our sources say they’ve recovered the hard drives and the guns. As for the instruments — we’re told cops are running down some leads.

It’s unclear if Petty’s storage unit was specifically targeted or randomly hit. Any potential future thieves out there, you’ve been warned … don’t come around there no more.