The Queensland fruit fly probably got into New Zealand on illegally imported produce, the Ministry for Primary Industries (MPI) says.
The ministry believes it has eradicated the pest, which was first spotted in Auckland in February.
Restrictions imposed by the ministry stopped people moving fruit and some vegetables through part of Grey Lynn.
Listen to more
But director-general Martyn Dunne said it had not seen a fruit fly since March and all restrictions had now been lifted.
He said it has cost $13.6 million to eradicate the pest.
Ministry chief operations officer Andrew Coleman said it was still not sure how the fly got into New Zealand but it was probably brought in illegally.
He said extra detection methods were now in place at the border to try and stop it happening again.
The flies had the potential to devastate the horticulture industry and heavy restrictions on the movement of fruit and vegetables were put in place after the initial find.
MPI said it would continue its routine pest checks which include a national network of 7600 traps.