​WestConnex contractors have been given two days to clean up their work site in Sydney's inner west after residents complained of foul odours emanating from the earthworks.

For more than a week, St Peters residents have experienced a "rotten egg" smell wafting from the worksite of the WestConnex M5 interchange, which is being built on top of the old Alexandria Landfill.

The smell has intensified with recent heavy rain and after receiving numerous complaints, the Environment Protection Authority issued CPB Contractors with a prevention notice on Wednesday, ordering them to fix the situation.

Emma Pierce, who lives about 500 metres from the construction site, said the smell "comes and goes" but at times had become so unbearable it had left her and her young family, feeling naueous.