Some chanted "Tsipras your contract is up", a reference to Greek Prime Minister Alexis Tsipras, whose creditor-mandated austerity has seen him trailing in opinion polls.
Garbage collectors fear job losses from new regulations governing short-term contract workers in the broader public sector, which includes local government.
A court order banning extensions to short-term contracts could leave up to 10,000 jobs on the line.
Greek authorities had offered a compromise, giving existing contractors precedence over newcomers when the system changes.
Job security is a sensitive issue in Greece, where one in four is unemployed as the country wrestles with its seventh year of austerity sought by international creditors in return for bailouts.
With temperatures soaring, Athenians were for days advised to keep rubbish indoors to avoid it attracting rodents.
However, many neighbourhoods were struggling with piles of trash overflowing from large wheelie bins.
"It's simply intolerable," said a woman who only identified herself as Vassiliki, 40.
"I live on the fifth floor and the stench wafts up there. There are mosquitoes and flies, the smell is just awful."