He used one man’s trash in an attempt to stay clean.

A city sanitation worker from Staten Island used license plates he picked up from a dumpster to remain incognito, as he racked up more than $17,000 in parking tickets, traffic violations and E-ZPass tolls and fees, the Department of Investigation said Wednesday.

Jason Rivera, 45, who makes about $77,300 a year as a waste collector, allegedly began using the scavenged plates on his personal car in 2017.

Since then, he’s allegedly dirtied himself up with 72 parking or traffic violations, totaling $5,500, $1,793.50 in unpaid tolls and $10,600 in unpaid fees.

Because the plates weren’t registered to any vehicle, authorities weren’t able to clean up any of the owed cash.

“These kinds of crimes undermine the government’s ability to do its job and maintain a standard of safety on the roads,” DOI Commissioner Margaret Garnett said.

“These offenses are particularly egregious when committed by a City employee who used his job as a means to commit the crime, according to the charges,” Garnett added.

According to court documents, a Department of Motor Vehicles investigator found the plates on Rivera’s gold 2012 Hyundai Genesis, which was parked outside the District 6 Garage in Gowanus where he worked, in 2018.

The investigator said Rivera came clean — telling her he pocketed the license plates from the trash while on duty in 2016 and later gave them to a friend, before putting them on his car “to avoid paying both tolls and parking fees.”

The binman was arrested Wednesday and charged with grand larceny in the third degree and obstructing governmental administration in the second degree.

He was released on his own reconnaissance during his arraignment in Brooklyn Criminal Court later Wednesday.

As he stepped out of court the potty-mouthed garbage man barked: “Get the f- -k away from me.”

The sanitation department said they suspended Rivera, who has worded there since 2006, on Wednesday.

The agency said it would be conducting an internal investigation and that, “further disciplinary action could result pending the outcome” of the probe.

His next court date is Oct. 10.