VicTrack will remove unused rail track, rail safety signage and other equipment from nine level crossings in the Castlemaine area.
The sections of disused rail corridor between these crossings will remain in place.
A Minister for Public Transport spokesperson said the works did not in any way preclude the possible return of rail services to the line in the future.
"It is being completed to improve both road and rail safety," they said.
"It will improve road safety by removing the wooden sleepers that result in the road surface breaking up as well as allow for a resurface of the road to be achieved.
"It will improve rail safety by ensuring that only level crossings that see train services have safety signage."